Closed ISilviu closed 2 years ago
Hi,
There is no need to proxy these things within the Django server in the production environment. Rather than introducing an unnecessary load on the Django server, you can use your web server's file serving to serve the Nextjs build files and reverse proxy to route related URLs directly to the Nextjs server.
Search for "reverse proxy" in the README.md, we've already covered that.
Hi,
I am already using a reverse proxy within the Apache server, yet the requests still seem to pass through the Django, since they always have text/html
as content-type. Then, I suspect there is a configuration issue in the Apache server.
Thank you!
Hi,
If the Django server is set to run with
debug=False
, then all the requests will pass through therender_nextjs_page_sync
, according to this statement inurls.py
:The problem is that all the
.js
bundles requests will have theircontent-type
property set totext/html
, as this is happening for each request that passes through this view:Should the
content-type
be manually computed and then specified as an argument to therender_nextjs_page_sync
method? I don't see other way around it.Thank you!