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

Replace App.getInitialProps with custom headers() in next.config.js #502

Closed
viktor-yakubiv opened this issue Oct 15, 2020 · 0 comments · Fixed by #503
Closed

Replace App.getInitialProps with custom headers() in next.config.js #502

viktor-yakubiv opened this issue Oct 15, 2020 · 0 comments · Fixed by #503
Assignees
Labels
♻️ refactoring Restructuring, cleaning up

Comments

@viktor-yakubiv
Copy link
Member

Having getInitialProps in the custom App disables static page optimisation for all pages, if I understand. We use this method only to add a custom header.

This is possible to do adding custom headers() function to the next.config.js. The function adds HTTP headers to the URL. It's also possible to have custom headers per page.


This could be related to #310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ refactoring Restructuring, cleaning up
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant