Skip to content

ENT-11481: Removed web server redirect from http to https - #1953

Merged
aleksandrychev merged 1 commit into
cfengine:masterfrom
aleksandrychev:ENT-11481
Oct 1, 2025
Merged

ENT-11481: Removed web server redirect from http to https #1953
aleksandrychev merged 1 commit into
cfengine:masterfrom
aleksandrychev:ENT-11481

Conversation

@aleksandrychev

@aleksandrychev aleksandrychev commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

HTTP_HOST can be manipulated via Host header and for this reason http to https redirect will be handled on the UI.

Ticket: ENT-11481
Signed-off-by: Ihor Aleksandrychiev ihor.aleksandrychiev@northern.tech

together: https://github.com/cfengine/mission-portal/pull/2906

@nickanderson nickanderson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure about this. It doesn't seem right.

Maybe it would be better to just not support the redirection.

@aleksandrychev

Copy link
Copy Markdown
Contributor Author

I am not sure about this. It doesn't seem right.

Maybe it would be better to just not support the redirection.

yes, at least not in httpd config.. I will re-do this one and open additional in the MP.

HTTP_HOST can be manipulated via Host header and for this reason http to https redirect will be handled on the UI.

Ticket: ENT-11481
Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
@aleksandrychev aleksandrychev changed the title Use SERVER_ADDR instead of HTTP_HOST in the redirect from http to https ENT-11481: Removed web server redirect from http to https Sep 30, 2025
@aleksandrychev

Copy link
Copy Markdown
Contributor Author

@nickanderson I changed this one and added https://github.com/cfengine/mission-portal/pull/2906

Comment thread deps-packaging/apache/httpd.conf
# Force https with redirection
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So this drops all http -> https redirection from apache directly. Seems OK i guess as long as we prevent login and stuff on http.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It will be a HTML (JavaScript) redirect instead.

@aleksandrychev
aleksandrychev merged commit be9ba7b into cfengine:master Oct 1, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants