Differentiation between requests send from next server and from the browser #10873
Unanswered
fabiocarneiro
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature request
Is your feature request related to a problem? Please describe.
When running the application in docker, it's common to access the container using their names, either by having them on the same network or using the link option.
For the requests that don't go through SSR, the value of the environment variable defined with
publicRuntimeConfig
will also be used even when requests don't go through Nodejs. Not always the value defined there (for example, a backend URL) will be accessible from the host.Describe the solution you'd like
I would like to split the
publicRuntimeConfig
configuration option (or introduce a new) that allows different values to be configured, depending on if the request is going to be sent from the browser or from the next server for SSR.Describe alternatives you've considered
docker inspect
on the container and pass as environment variable the IP, which is the same either from inside another container or from the host./etc/hosts
fileBeta Was this translation helpful? Give feedback.
All reactions