summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system/htdocs/luci-static
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2020-12-14 13:11:08 +0100
committerPaul Spooren <mail@aparcar.org>2021-09-28 10:46:36 -1000
commit7c943a1d6bcf449019ca8a43e800e51f269bb8f6 (patch)
treef58be2af57522b01f2c045a430879e15f54ce222 /modules/luci-mod-system/htdocs/luci-static
parentb5faba12442529d282668268aee0d54bd98f1419 (diff)
luci-mod-system: allow configuration of HTTPS redirection
Add a posibility for easy configuration of HTTPS redirection in uHTTPd. References: https://lists.infradead.org/pipermail/openwrt-devel/2020-December/032718.html Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static')
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/uhttpd.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/uhttpd.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/uhttpd.js
new file mode 100644
index 0000000000..d02e18505a
--- /dev/null
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/uhttpd.js
@@ -0,0 +1,22 @@
+'use strict';
+'require view';
+'require form';
+
+return view.extend({
+ render: function() {
+ var m, s, o;
+
+ m = new form.Map('uhttpd', _('HTTP(S) Access'), _('uHTTPd offers <abbr title="Hypertext Transfer Protocol">HTTP</abbr> or <abbr title="Hypertext Transfer Protocol Secure">HTTPS</abbr> network access.'));
+
+ s = m.section(form.NamedSection, 'main', 'uhttpd', _('Settings'));
+ s.addremove = false;
+
+ o = s.option(form.Flag, 'redirect_https', _('Redirect to HTTPS'), _('Enable automatic redirection of <abbr title="Hypertext Transfer Protocol">HTTP</abbr> requests to <abbr title="Hypertext Transfer Protocol Secure">HTTPS</abbr> port.'));
+ o.enabled = 'on';
+ o.disabled = 'off';
+ o.default = o.disabled;
+ o.rmempty = false;
+
+ return m.render();
+ }
+});