-
-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(api): Add option to set custom fiber ReadBufferSize param #637
Conversation
@TwiN please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think the default value (4096) is too low, given that you ran into this issue?
func getReadBufferSize() int { | ||
bufferSizeStr, exists := os.LookupEnv("GATUS_API_READ_BUFFER_SIZE") | ||
if !exists { | ||
return 4096 // Default value | ||
} | ||
bufferSize, err := strconv.Atoi(bufferSizeStr) | ||
if err != nil { | ||
log.Printf("Error converting GATUS_API_READ_BUFFER_SIZE to integer: %s", err.Error()) | ||
return 4096 // Default value in case of conversion error | ||
} | ||
return bufferSize | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this block at the bottom of the file?
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #637 +/- ##
==========================================
- Coverage 78.49% 78.41% -0.08%
==========================================
Files 58 58
Lines 4705 4716 +11
==========================================
+ Hits 3693 3698 +5
- Misses 827 833 +6
Partials 185 185 ☔ View full report in Codecov by Sentry. |
- [Troubleshooting](#troubleshooting) | ||
- [How to solve `Request Header Fields Too Large` error?](#how-to-solve-request-header-fields-too-large-error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like there's a bit of an overlap between Troubleshooting
and the current use of the FAQ
section 🤔
I got this error as well while I put Gatus behind the Cloudflare Access. Can we merge this ? |
@lifez As soon as @arturkasperek addresses my comment and resolves the conflict in the PR, I can merge this :) |
@arturkasperek Let me know if you don't have bandwidth to address this. I can done this for us cc @TwiN |
Dont have time - please handle that |
@TwiN @arturkasperek Since I cannot edit this PR, this is the new one #663 |
Thank you both @arturkasperek @lifez! |
Superseded by #675 |
Summary
This PR adds option to setup custom parameter
GATUS_API_READ_BUFFER_SIZE
. This param tweaks fiberReadBufferSize
that control max header size (read more here https://github.com/gofiber/fiber/blob/master/docs/api/fiber.md#config).The problem occurred in my company cause we use gatus on the same domain as app and this causes sending large cookies.
Issue: #636
Checklist
README.md
, if applicable.