Skip to content

Commit a318d3f

Browse files
committed
Only add port if not already set
1 parent ee6a92c commit a318d3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docker/runtime/etc/apache2/conf-enabled/mapserver.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ ScriptAliasMatch "^${MAPSERVER_BASE_PATH}" /usr/local/bin/mapserv_wrapper
2323
# Digital Ocean does not seem to pass this header back
2424
# even though HTTP_X_FORWARDED_HOST is
2525
# SetEnv HTTP_X_FORWARDED_PORT 443
26-
RequestHeader set X-Forwarded-Port "443"
26+
# Only set the header if it is not already present
27+
RequestHeader set X-Forwarded-Port "443" env=!X_FORWARDED_PORT
2728
</LocationMatch>
2829

2930
ExtendedStatus On

0 commit comments

Comments
 (0)