User-defined subdomains + API routes #14636
Unanswered
kennethacohen
asked this question in
Help
Replies: 2 comments
-
+1 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Can't you use a catch-all DNS record which redirects all traffic to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to understand if this project is feasible using NextJS + API routes (i.e. avoiding a custom express server).
What I'm trying to achieve:
site.com
usera.site.com
,userb.site.com
etc.usera.site.com/posts
would show posts for onlyusera
, meaning I would probably want to GETusera.site.com/api/v1/posts
My current understanding is that I would want to set up something like NGINX to reverse proxy these requests to the main application, but haven't seen a pattern for this anywhere. Also possible I just need to go with the custom server route, but would like to avoid that as I've enjoyed dev'ing with the built in Next APIs.
Would appreciate any help here ❤️
Beta Was this translation helpful? Give feedback.
All reactions