We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Making a HTTP request with large headers to a Managed Runtime environment results in a HTTP 413 response:
$ curl 'https://pwa-kit.mobify-storefront.com/' \ -H 'x-mobify-cachebreaker: 1' \ -H "x-huge-header: $(python3 -c 'print("x" * 10240)')" HTTP header is larger than 10240 bytes.
This MRT environment constraint is documented:
The maximum size of the HTTP request line and headers is 10240 bytes. Requests exceeding this size return an HTTP 413 Content Too Large.
In web browsers, most large headers come from cookies.
If a MRT Environment has enabled cookies AND many large cookies are set by the site, it is possible to hit this constraint.
Most PWA Kit sites should not enable the MRT allow_cookies setting. It is only required if you are altering server side rendering based on cookies.
allow_cookies
As a workaround, the MRT's Request Processor can be used to either remove or alter the cookie header to prevent hitting this limit:
// request-processor.js export const processRequest = function removeCookies({ headers, path, querystring, }) { headers.deleteHeader('cookie') return {path, querystring} }
Ideally, this constraint wouldn't exist or at least, it would be possible to customize the error message to help shoppers continue their sessions.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Making a HTTP request with large headers to a Managed Runtime environment results in a HTTP 413 response:
This MRT environment constraint is documented:
In web browsers, most large headers come from cookies.
If a MRT Environment has enabled cookies AND many large cookies are set by the site, it is possible to hit this constraint.
Most PWA Kit sites should not enable the MRT
allow_cookies
setting. It is only required if you are altering server side rendering based on cookies.As a workaround, the MRT's Request Processor can be used to either remove or alter the cookie header to prevent hitting this limit:
Ideally, this constraint wouldn't exist or at least, it would be possible to customize the error message to help shoppers continue their sessions.
The text was updated successfully, but these errors were encountered: