Skip to content
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

redirect to HTTP_HOST to support aliases #3508

Merged
merged 2 commits into from
Apr 11, 2024
Merged

redirect to HTTP_HOST to support aliases #3508

merged 2 commits into from
Apr 11, 2024

Conversation

johrstrom
Copy link
Contributor

redirect to HTTP_HOST to support aliases. Tests will fail for a bit while I update the fixtures, but I want to get a spot check on it before I proceed.

This should fix #3442 - or at least I'm hoping to.

RewriteRule ^(.*) <%= @ssl ? "https" : "http" %>://<%= @proxy_server %>:<%= @port %>$1 [R=301,NE,L]
RewriteRule ^(.*) <%= @ssl ? "https" : "http" %>://%{HTTP_HOST}:<%= @port %>$1 [R=301,NE,L]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change will work to fix #3442 so that any http -> https redirects will respond to the various server aliases we have. I should actually hop on dev to confirm this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm this works in dev, but could still use a 2nd pair of eyes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct. I think this will even work with Proxies since HTTP_HOST would be the address used to access OnDemand.

@johrstrom johrstrom merged commit 12375e0 into master Apr 11, 2024
23 checks passed
@johrstrom johrstrom deleted the alias-redirect branch April 11, 2024 15:53
johrstrom added a commit that referenced this pull request May 10, 2024
redirect to http requests to HTTP_HOST to support aliases.
@johrstrom johrstrom mentioned this pull request May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

host_based_profiles don't work correctly
3 participants