-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Add a way to get subdomain #8936
Comments
i use something like this in getInitialProps where req is the req from context
|
There is no way for us to reliably handle this as subdomains can come in many forms and parsing them should be done by the user to avoid security issues in Next.js. For example Next.js also doesn't handle the |
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. |
Feature request
I'm interested in the latest functionality of Now, the wildcard domain, but even with the static fun example, no simple example of how to use and recover a subdomain is available.
Is your feature request related to a problem? Please describe.
My use case is as follows: I use the with-apollo example and my goal is to include a variable containing the current subdomain
Describe the solution you'd like
The current router does not offer the possibility of recovering subdomains. A good thing would be to be able to access this information simply.
Describe alternatives you've considered
I don't know if you can use a getInitialProps and if there is a simpler way to do it
Thanks,
The text was updated successfully, but these errors were encountered: