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

upstream sent too big header while reading response header from upstream #46

Open
indykoning opened this issue Aug 1, 2024 · 1 comment

Comments

@indykoning
Copy link

Once installed, on certain pages Nginx will throw upstream sent too big header while reading response header from upstream and cause 502s.
After looking into it, this module might have a hand in it due to the amount of links it can add in a bloated Magento install.

I've ran into it myself making a similar extension for Laravel.
My solution was to implement a configurable size limit which removes links until the size limit is reached.
https://github.com/justbetter/laravel-http3earlyhints/blob/76f012e994cabde3b8f4c75889704546747ae760/src/Middleware/AddHttp3EarlyHints.php#L149

I think this might be a nice solution for this package as well

@jissereitsma
Copy link
Collaborator

I hate to say this, but this makes zero sense to me. The addition of this module is to enhance performance. If an Nginx configuration is not allowing large headers, then either this module needs to be skipped because apparently the webserver does not allow for tuning this, or the webserver needs to be tuned. There are more instances where Magento adds big headers - for instance CSP or CORS - and to hack the headers half-half seems like a worse solution. I don't think this change will make sense. And it will make support a hell ("why are part of the link-headers missing").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants