-
Notifications
You must be signed in to change notification settings - Fork 27.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
No HTML compression via custom server & app.render() #16378
Comments
@YichiZ exactly |
@timneutkens Is the related bug or PR is manageable to have this resolved? |
The open PR has failing tests and no new tests added. Feel free to open a new PR that does have an integration test 👍 |
I've added test cases, @timneutkens. I have one question - should |
…vercel#18891) Co-authored-by: Radosław Grochowski <radoslaw.grochowski@grupawp.pl> Co-authored-by: Tim Neutkens <timneutkens@me.com>
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
If you write custom server routes via
app.render()
there is no gzip compression for the HTML document. I looked at the source code: thehandleCompression()
fn is only called via theapp.getRequestHandler()
. I guess this is not intended.next.js/packages/next/next-server/server/next-server.ts
Lines 866 to 872 in 8efc8be
To Reproduce
yarn create next-app --example custom-server custom-server-app
)yarn build && yarn start
http://localhost:3000/a
inspect HTML document response header via chrome dev tools orcURL
Content-Encoding: gzip
response header 👎http://localhost:3000/
inspect HTML document response header via chrome dev tools orcURL
Content-Encoding: gzip
response header available 👍Expected behavior
app.render()
Content-Encoding: gzip
System information
The text was updated successfully, but these errors were encountered: