Skip to content
Discussion options

You must be logged in to vote

On a technical level, there really isn't an issue tampering with the server.js file, as it will never be accessible to clients. However, I would strongly advise against doing so, as next uses these patterns as a security boundary. If you're dynamically changing them, you need to be very careful about validating the environment variables to prevent unintended domains from being allowed. Also, messing with build output files such as server.js can be a maintenance burden, and just isn't the recommended approach. Hope that helps 👍

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@itsdapi
Comment options

Answer selected by itsdapi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants