We’re running a Next.js app on Vercel where users get access to a custom subdomain with their profile — ie jason.mysite.com.
We’re trying to build the use case here (SSL for Custom Domains · Fly) where paid users get to link their custom domain to the existing subdomain.
Deployed the basic NGINX reverse proxy outlined here (GitHub - fly-apps/nginx: A fly app nginx config) to Fly and now trying to pass the original host header through to map that in our db to the custom domain configed by the user.
How do we properly parse out the X-Forwarded-Host header in our app?