Invalid X-Forwarded-Port for NextJS deployed application
I have created a NextJS application
aws-clerk-nextjs-production.up.railway.app
. Logging the x-forwarded-port
in the console it seems that instead of either a 443,80
or a 443
value we probably get the value of latest node from the route path.
The same application deployed in a AWS Amplify Hosting we get both forwardedPort: '443,80',
so i guest it's related to how the headers between nodes of the network are propagated and how it's being merged.
Is there a more official way to file a bug report? Do you need more details? Is there a guide i should take a look and improve this report?8 Replies
Please provide your project ID or reply with
N/A
. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.@Percy Project ID: dca25c2a-c0e2-4cf2-9d5c-3938efc1def4
Could you please re-open the thread?
thread doesn't actually get closed fwiw
but my answer still stands
@brody It may be related to the application/framework. I am using NextJS.
How do you retrieve the values from the headers in https://utilities.up.railway.app/raw ? Do you use any framework?
it's just a display of the raw http request
it's just there to demonstrate everything that's available to your app on an incoming request
and as you can see, no x-forwarded-port header
I will take a better look about how this header is being populated in my case and come back with more information.
Thank you for the immediate response and the info 😄
no problem!