aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/uhttpd
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-05-30 20:55:14 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-05-30 20:55:14 +0000
commit4f58248a7d2c0fa96ba03ddd344206764f120288 (patch)
tree6ee19881894e5396ecc02743ac64b0915a653cff /package/network/services/uhttpd
parentb34988d5d0c6104eea40859224ecb84e9e8ab3ce (diff)
downloadupstream-4f58248a7d2c0fa96ba03ddd344206764f120288.tar.gz
upstream-4f58248a7d2c0fa96ba03ddd344206764f120288.tar.bz2
upstream-4f58248a7d2c0fa96ba03ddd344206764f120288.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> SVN-Revision: 45852
Diffstat (limited to 'package/network/services/uhttpd')
-rw-r--r--package/network/services/uhttpd/Makefile4
-rw-r--r--package/network/services/uhttpd/files/uhttpd.config3
-rwxr-xr-xpackage/network/services/uhttpd/files/uhttpd.init2
3 files changed, 7 insertions, 2 deletions
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile
index 3fa0ab3aae..c499f8bb53 100644
--- a/package/network/services/uhttpd/Makefile
+++ b/package/network/services/uhttpd/Makefile
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
-PKG_VERSION:=2015-05-30
+PKG_VERSION:=2015-05-31
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://nbd.name/uhttpd2.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=618493e378e2239f0d30902e47adfa134e649fdc
+PKG_SOURCE_VERSION:=a91aac9419f535f067ac17c16475912062d947ea
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
PKG_LICENSE:=ISC
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