We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef6d1c7 commit fd0e733Copy full SHA for fd0e733
1 file changed
src/ngx_http_security_headers_module.c
@@ -225,7 +225,7 @@ ngx_http_security_headers_filter(ngx_http_request_t *r)
225
ngx_str_set(&key, "x-varnish");
226
ngx_str_set(&val, "");
227
ngx_set_headers_out_by_search(r, &key, &val);
228
-
+
229
/* Hide X-Application-Version */
230
ngx_str_set(&key, "x-application-version");
231
@@ -261,7 +261,7 @@ ngx_http_security_headers_filter(ngx_http_request_t *r)
261
}
262
263
#if (NGX_HTTP_SSL)
264
- if (r->connection->ssl)
+ if (r->schema.len == 5 && ngx_strncmp(r->schema.data, "https", 5) == 0)
265
{
266
ngx_str_set(&key, "Strict-Transport-Security");
267
ngx_str_set(&val, "max-age=63072000; includeSubDomains; preload");
0 commit comments