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

FS#3144 - uhttpd: https redirect should be to a configurable hostname #7893

Open
openwrt-bot opened this issue Jun 2, 2020 · 0 comments
Open
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jun 2, 2020

patrakov:

Supply the following if possible:

  • Device problem occurs on: all
  • Software versions of OpenWrt/LEDE release, packages, etc.: master ~2 weeks old
  • Steps to reproduce: see below

Install luci-ssl. It will configure uhttpd to listen on port 443 and redirect http to https. In particular, it will add to /etc/config/uhttpd:

option redirect_https '1'

However, the semantics of this redirect are wrong if a non-self-signed certificate is used.

In particular, it is now a boolean option, and always gets the redirect target from the Host: header. That is, it redirects http://192.168.1.1/ to https://192.168.1.1/, and, assuming that openwrt.mydomain.ru resolves to 192.168.1.1, it will also redirect http://openwrt.mydomain.ru/ to https://openwrt.mydomain.ru/.

What I want is a string option that specifies the domain for redirects. I.e., I should be able to set something like this:

option redirect_https_domain 'openwrt.mydomain.ru'

and then both http://192.168.1.1/ and http://openwrt.mydomain.ru/ and http://anything.that.resolves.to.192.168.1.1.com/ should redirect to https://openwrt.mydomain.ru/.

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

No branches or pull requests

1 participant