diff options
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" ) +} |