Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

webui: Add option to redirect to HTTPS #1521

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NHellFire
Copy link

Adds an option to force HTTPS for the webui.

@themiron
Copy link
Contributor

themiron commented Dec 6, 2017

why not 301 status?

@NHellFire
Copy link
Author

It was already a JS redirect, I tried to change as little as possible.

@RMerl
Copy link
Owner

RMerl commented Dec 16, 2017

Just redirecting won't be enough, since the https port might not be 443. This will have to be taken into consideration.

Also, I would prefer a radio button rather than a checkbox on the webui, to be in-like with the rest of the UI.

@RMerl
Copy link
Owner

RMerl commented Dec 16, 2017

Wouldn't handling this in httpd.c as a 301 actually reduce the amount of changes required (as do_ssl wouldn't need to be moved for instance)? I was thinking of possibly handle_request() as a potential location.

@NHellFire
Copy link
Author

Hrm, I thought I included the port.. maybe I committed the wrong version.

I can change it to a radio and look at doing it in handle_request() as a 302 (301 is a permanent redirect so if SSL is disabled or port is changed, browser cache will need clearing as it won't recheck it).

@RMerl
Copy link
Owner

RMerl commented Dec 16, 2017

302 might possibly be better indeed in this case, although when I configure a customer's website to redirect http to https through mod_rewrite, I always used a 301, as 302 seem to imply that it's expected to eventually no longer redirect.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants