diff options
author | Patrick Spek <p.spek@tyil.nl> | 2019-10-22 12:20:04 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2019-10-22 12:20:04 +0200 |
commit | 271d616cb155460d3c364de0ace1fbc37419a3ec (patch) | |
tree | 34836ce99b701d435c26b1e7fda8344ffd0eaa6f /.docker/lighttpd.conf | |
parent | eb3654222ba31f6d82a33232ddff6f9880243694 (diff) |
Attempt to do redirection from lighttpd
Diffstat (limited to '.docker/lighttpd.conf')
-rw-r--r-- | .docker/lighttpd.conf | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/.docker/lighttpd.conf b/.docker/lighttpd.conf index 132ad29..c8f6f72 100644 --- a/.docker/lighttpd.conf +++ b/.docker/lighttpd.conf @@ -1,4 +1,7 @@ -server.modules += ( "mod_setenv" ) +server.modules += ( + "mod_setenv", + "mod_redirect", +) setenv.add-response-header = ( "Content-Security-Policy" => "default-src 'self'; img-src https:; object-src 'self'; script-src 'self'; style-src 'self'", @@ -8,3 +11,9 @@ setenv.add-response-header = ( "X-Permitted-Cross-Domain-Policies" => "none", "X-XSS-Protection" => "1; mode=block", ) + +include_shell "/usr/local/bin/lighttpd-env.sh" + +$HTTP["host"] != var.intendedHost { + url.redirect = ( "^/(.*)" => var.intendedHostProto + "://" + var.intendedHost + "/$1" ) +} |