diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-05-30 20:55:14 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-05-30 20:55:14 +0000 |
commit | 14bda8aad1abf2f07d621c49ff791d013d03f60f (patch) | |
tree | e251de041bb87b31565342914969140c1744a658 /package/network/services/uhttpd/files | |
parent | e2404b564fe87c76bd95a8faf4d1b552f4ca9eb2 (diff) | |
download | master-187ad058-14bda8aad1abf2f07d621c49ff791d013d03f60f.tar.gz master-187ad058-14bda8aad1abf2f07d621c49ff791d013d03f60f.tar.bz2 master-187ad058-14bda8aad1abf2f07d621c49ff791d013d03f60f.zip |
uhttpd: add support for enforcing https
Also set HTTPS environment variable for CGI programs on SSL connections.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45852 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/uhttpd/files')
-rw-r--r-- | package/network/services/uhttpd/files/uhttpd.config | 3 | ||||
-rwxr-xr-x | package/network/services/uhttpd/files/uhttpd.init | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/package/network/services/uhttpd/files/uhttpd.config b/package/network/services/uhttpd/files/uhttpd.config index 83734af5a9..9df6e24527 100644 --- a/package/network/services/uhttpd/files/uhttpd.config +++ b/package/network/services/uhttpd/files/uhttpd.config @@ -9,6 +9,9 @@ config uhttpd main list listen_https 0.0.0.0:443 list listen_https [::]:443 + # Redirect HTTP requests to HTTPS if possible + option redirect_https 1 + # Server document root option home /www diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init index c493aafe42..1ebe38e8d3 100755 --- a/package/network/services/uhttpd/files/uhttpd.init +++ b/package/network/services/uhttpd/files/uhttpd.init @@ -126,6 +126,8 @@ start_instance() procd_append_param command -s "$listen" done } + + append_bool "$cfg" redirect_https "-q" 0 } procd_close_instance |