-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Body size error #5317
Comments
Hi @llomgui thanks for reporting! Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂 Cheers! |
Hi @llomgui ,thanks for the opening the issue! We will be discussing this issue in out next triage meeting on Monday 8th April, please feel free to join if you'd like (Zoom details are on the project homepage). |
Hi @llomgui we use a reference implementation here so user is free to make changes: |
@llomgui A simple example while we look at this, would look like this (using snippets)
That snippet will set HTH |
Did the snippet solution work for you @llomgui? |
Hello, no the solution is to override oidc.conf file using a mounted configmap. |
Describe the bug
I got errors during a POST with a body size > 1mb.
It keeps returning error 500 with the following log:
2024/03/27 09:36:48 [error] 73#73: *5036785 client intended to send too large body: 1379677 bytes, client: X.X.X.X, server: example.com, request: "POST /path HTTP/1.1", subrequest: "/_jwks_uri", host: "example.com", referrer: "https://example.com/referrer"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error because
client-max-body-size: 128M
is set in configmap and is also present in location / in VS generated file.Your environment
Cause
As you can see in the log, there is a subrequest to /_jwks_uri : https://github.com/nginxinc/kubernetes-ingress/blob/main/internal/configs/oidc/oidc.conf#L9
The solution would be to inject
client_max_body_size
in this location, or setclient_max_body_size
on the server directive instead of location. https://github.com/nginxinc/kubernetes-ingress/blob/main/internal/configs/version2/nginx-plus.virtualserver.tmpl#L79If you wan to inject
client_max_body_size
on the server directive, you also need to move the struct to Server https://github.com/nginxinc/kubernetes-ingress/blob/main/internal/configs/version2/http.go#L170The text was updated successfully, but these errors were encountered: