-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Fix form actions for apps deployed behind reverse proxy #51403
Fix form actions for apps deployed behind reverse proxy #51403
Conversation
Hi @SteveSandersonMS. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @SteveSandersonMS !
Hi @SteveSandersonMS. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed. |
Fix form actions for apps deployed behind reverse proxy
Makes forms work for apps deployed behind a reverse proxy.
Description
Apps deployed behind a reverse proxy (e.g., container apps) should not try to emit absolute URLs by default because the scheme/hostname/port may differ from what is reachable from the outside world. The fix is to emit root-relative URLs.
Fixes #51380
Customer Impact
Without this fix, apps deployed behind a reverse proxy (e.g., in ACA) would not support form posts.
Regression?
No because this only affects SSR forms, which is a new feature in .NET 8.
Risk
Low because this is only a change to how we generate the URL for a form's
action
attribute. Previously we used an absolute URL, but now we use a root-relative one. There is no other runtime change. Everything else in this PR is extra tests and updating existing tests.Verification
Packaging changes reviewed?