Skip to content

Commit f14aba3

Browse files
committed
add includeSubdomains to Strict-Transport-Security
1 parent 27e7dbf commit f14aba3

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

src/js/helpers/apache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default (form, output) => {
5757
conf +=
5858
'\n'+
5959
' # HTTP Strict Transport Security (mod_headers is required) ('+output.hstsMaxAge+' seconds)\n'+
60-
' Header'+(minver("2.0.0", form.serverVersion) ? ' always' : '')+' set Strict-Transport-Security "max-age='+output.hstsMaxAge+'"\n';
60+
' Header'+(minver("2.0.0", form.serverVersion) ? ' always' : '')+' set Strict-Transport-Security "max-age='+output.hstsMaxAge+'; includeSubDomains"\n';
6161
}
6262

6363
conf +=

src/js/helpers/caddy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default (form, output) => {
6161
conf +=
6262
'\n'+
6363
' # HSTS ('+output.hstsMaxAge+' seconds)\n'+
64-
' header Strict-Transport-Security "max-age='+output.hstsMaxAge+'"\n';
64+
' header Strict-Transport-Security "max-age='+output.hstsMaxAge+'; includeSubDomains"\n';
6565
}
6666

6767
conf +=

src/js/helpers/go.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default (form, output) => {
1919
' mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {\n'+
2020
(form.hsts
2121
?
22-
' w.Header().Add("Strict-Transport-Security", "max-age='+output.hstsMaxAge+'")\n'
22+
' w.Header().Add("Strict-Transport-Security", "max-age='+output.hstsMaxAge+'; includeSubDomains")\n'
2323
: '')+
2424
' w.Write([]byte("This server is running the Mozilla '+form.config+' configuration.\\n"))\n'+
2525
' })\n';

src/js/helpers/haproxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default (form, output) => {
7272
' redirect scheme https code '+output.hstsRedirectCode+' if !{ ssl_fc }\n'+
7373
'\n'+
7474
' # HSTS ('+output.hstsMaxAge+' seconds)\n'+
75-
' http-response set-header Strict-Transport-Security max-age='+output.hstsMaxAge+'\n';
75+
' http-response set-header Strict-Transport-Security "max-age='+output.hstsMaxAge+'; includeSubDomains"\n';
7676
}
7777

7878
return conf;

src/js/helpers/lighttpd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export default (form, output) => {
187187
'$HTTP["scheme"] == "https" {\n'+
188188
' # HTTP Strict Transport Security ('+output.hstsMaxAge+' seconds)\n'+
189189
' setenv.add-response-header = (\n'+
190-
' "Strict-Transport-Security" => "max-age='+output.hstsMaxAge+'"\n'+
190+
' "Strict-Transport-Security" => "max-age='+output.hstsMaxAge+'; includeSubDomains"\n'+
191191
' )\n'+
192192
'}\n'+
193193
'else $HTTP["scheme"] == "http" {\n';

src/js/helpers/litespeed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default (form, output) => {
5252
' <uri>/</uri>\n'+
5353
' <location>$DOC_ROOT/</location>\n'+
5454
' <allowBrowse>1</allowBrowse>\n'+
55-
' <extraHeaders>Header Set Strict-Transport-Security: max-age='+output.hstsMaxAge+'</extraHeaders>\n'+
55+
' <extraHeaders>Header Set Strict-Transport-Security: max-age='+output.hstsMaxAge+'; includeSubDomains</extraHeaders>\n'+
5656
' <addDefaultCharset>off</addDefaultCharset>\n'+
5757
' </context>\n'+
5858
'</virtualHostConfig>\n';

src/js/helpers/nginx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default (form, output) => {
3030
conf +=
3131
'\n'+
3232
' # HSTS (ngx_http_headers_module is required) ('+output.hstsMaxAge+' seconds)\n'+
33-
' add_header Strict-Transport-Security "max-age='+output.hstsMaxAge+'"'+(minver("1.7.5", form.serverVersion) ? ' always' : '')+';\n';
33+
' add_header Strict-Transport-Security "max-age='+output.hstsMaxAge+'; includeSubDomains"'+(minver("1.7.5", form.serverVersion) ? ' always' : '')+';\n';
3434
}
3535

3636
conf +=

src/js/helpers/openlitespeed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default (form, output) => {
4949
'context / {\n'+
5050
' location $DOC_ROOT/\n'+
5151
' allowBrowse 1\n'+
52-
' extraHeaders Header Set Strict-Transport-Security: max-age='+output.hstsMaxAge+'\n'+
52+
' extraHeaders Header Set Strict-Transport-Security: max-age='+output.hstsMaxAge+'; includeSubDomains\n'+
5353
'}\n';
5454
}
5555

src/js/helpers/oraclehttp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default (form, output) => {
2424
conf +=
2525
'\n'+
2626
' # HTTP Strict Transport Security (mod_headers is required) ('+output.hstsMaxAge+' seconds)\n'+
27-
' Header always set Strict-Transport-Security "max-age='+output.hstsMaxAge+'"\n';
27+
' Header always set Strict-Transport-Security "max-age='+output.hstsMaxAge+'; includeSubDomains"\n';
2828
}
2929

3030
conf +=

0 commit comments

Comments
 (0)