mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-25 14:08:09 +00:00
add Strict-Transport-Security header even when https is configured at the load balancer
Refer #417
This commit is contained in:
parent
b07697f6ff
commit
cd8f3c1aa4
@ -60,6 +60,7 @@ server {
|
||||
|
||||
## See app/controllers/application_controller.rb for headers set
|
||||
add_header X-Accel-Buffering {{NGINX_ACCEL_BUFFERING}};
|
||||
add_header Strict-Transport-Security "max-age={{NGINX_HSTS_MAXAGE}};";
|
||||
|
||||
## Individual nginx logs for this GitLab vhost
|
||||
access_log {{GITLAB_LOG_DIR}}/nginx/gitlab_access.log;
|
||||
|
||||
@ -712,6 +712,8 @@ nginx_configure_gitlab_hsts() {
|
||||
sed -i "/{{NGINX_HSTS_MAXAGE}}/d" ${GITLAB_NGINX_CONFIG}
|
||||
fi
|
||||
update_template ${GITLAB_NGINX_CONFIG} NGINX_HSTS_MAXAGE
|
||||
else
|
||||
sed -i "/{{NGINX_HSTS_MAXAGE}}/d" ${GITLAB_NGINX_CONFIG}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user