Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ext/lb/nginx/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ http {
ssl_certificate_key {{ $host.SSLCertKey }};
server_name{{ range $name := $host.ServerNames }} {{ $name }}{{ end }};

# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
add_header Strict-Transport-Security max-age=15768000;

location / {
{{ if $host.SSLBackend }}proxy_pass https://{{ $host.Upstream.Name }};{{ else }}proxy_pass http://{{ $host.Upstream.Name }};{{ end }}
}
Expand All @@ -153,4 +156,4 @@ http {

include {{ .Config.ConfigBasePath }}/conf.d/*.conf;
}
`
`