Skip to content
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

"Too big request header" #238

Closed
2 tasks done
Quasarman opened this issue Oct 12, 2023 · 7 comments · Fixed by #244
Closed
2 tasks done

"Too big request header" #238

Quasarman opened this issue Oct 12, 2023 · 7 comments · Fixed by #244
Assignees
Labels
type:bug Something isn't working

Comments

@Quasarman
Copy link

Is there an existing issue for this?

  • I have searched the existing issues
  • And it has nothing to do with Traefik

Describe the bug

When the auth cookies for my website are present and I try to a non existing page I get "Too big request header" instead of the error page. When I clear said cookies I see my error page as expected.

Steps to reproduce

  1. Setup error pages
  2. Set long token in cookies
  3. Get "Too big request header" instead of error page

Configuration files

No response

Relevant log output

No response

Anything else?

I am not sure if this is a traefik issue, It does only happen with the error page container, accessing the normal webpage is fine with and without the auth cookies set.

@Quasarman Quasarman added the type:bug Something isn't working label Oct 12, 2023
@tarampampam
Copy link
Owner

Could you please provide an example (e.g., a curl command) to reproduce the error?

@Quasarman
Copy link
Author

I think this is related: traefik/traefik#8846

Maybe we can configure thr max header bytes for the error pages server aswell? Via a env variable or so.

I dont really have an example on hand since i dont want to provide my auth cookies (for obvious reasons).

@alphanoob1337
Copy link
Contributor

I forked the project and introduced a new environment variable READ_BUFFER_SIZE which can be used to pass the desired maximum request size in bytes (including header and body). See pull request #244.

@Quasarman
Copy link
Author

Very nice thank you! 😀

@tarampampam tarampampam linked a pull request Nov 20, 2023 that will close this issue
@tarampampam
Copy link
Owner

🚀 v2.26.0

@keitetran
Copy link

I have this error with traefik.

Too big request header

My env

READ_BUFFER_SIZE: 1024

How to fix it ? Thank bro.

@alphanoob1337
Copy link
Contributor

Just increase the number until it works. A larger read buffer has only one negative side-effect: the resource consumption is slightly higher. On an average server and normal load conditions this should not cause any problems since error-pages does not require many resources in the first place. But it might make it easier for someone with bad intentions to deliberately overload your server by sending many requests with a lot of payload data. So you also don't want to increase the read buffer to the maximum possible value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants