diff options
author | Britney Fransen <brfransen@gmail.com> | 2018-09-06 16:35:27 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2018-09-06 16:35:27 (GMT) |
commit | 5669815ec3a539cf7b5ac7d8da2cbba3aeff44be (patch) | |
tree | f13051093a52f47f5954c2ee2a783bc2f0f62f96 /abs/extra/shellinabox/shellinaboxd.include | |
parent | 8d35f28049488f2585ef765bf48e7a58958fd587 (diff) | |
parent | 04697136037cb5341ee6c051f8aaa265c0400c82 (diff) | |
download | linhes_pkgbuild-5669815ec3a539cf7b5ac7d8da2cbba3aeff44be.zip linhes_pkgbuild-5669815ec3a539cf7b5ac7d8da2cbba3aeff44be.tar.gz linhes_pkgbuild-5669815ec3a539cf7b5ac7d8da2cbba3aeff44be.tar.bz2 |
Merge branch 'testing'
Diffstat (limited to 'abs/extra/shellinabox/shellinaboxd.include')
-rw-r--r-- | abs/extra/shellinabox/shellinaboxd.include | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/abs/extra/shellinabox/shellinaboxd.include b/abs/extra/shellinabox/shellinaboxd.include index 8d2befa..405a323 100644 --- a/abs/extra/shellinabox/shellinaboxd.include +++ b/abs/extra/shellinabox/shellinaboxd.include @@ -1,3 +1,16 @@ +#redirect http to https for /shell +server.modules += ( "mod_redirect" ) + +$HTTP["url"] =~ "^/shell" { + $HTTP["scheme"] == "http" { + # capture vhost name with regex conditiona -> %0 in redirect pattern + # must be the most inner block to the redirect rule + $HTTP["host"] =~ ".*" { + url.redirect = (".*" => "https://%0$0") + } + } +} + #proxy for shellinaboxd $HTTP["url"] =~ "/shell/" { proxy.server = ( "" => ( |