Skip to content

Commit be9f982

Browse files
committed
update security headers following Moz recom
1 parent b25c632 commit be9f982

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Header set X-XSS-Protection "1; mode=block"
66
Header set X-Content-Type-Options "nosniff"
77
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains"
8-
Header set Referrer-Policy "no-referrer-when-downgrade"
8+
Header set Referrer-Policy "strict-origin-when-cross-origin"
99
# Put your domain here (or your wildcard *, if you experience any problems)
1010
Header set Access-Control-Allow-Origin "https://YOURDOMAIN.com/"
1111
# Adjust to your needs. GET should be enough for simple landingpages. Sometimes, you might need 'GET, POST'.

config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
// Base URL of your microsite.
4949
$the_page_url = 'https://YOURDOMAIN.com/';
50-
// $the_page_url = '/'; (use this for localhost dev/tests via Docker)
50+
// $the_page_url = '/'; // (use this for localhost dev/tests via Docker)
5151

5252
// PWA settings.
5353
$the_webapp_name = 'Put the name for the webapp here'; // Mind manifest.json too.

nginx_conf/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
add_header X-XSS-Protection '1; mode=block';
107107
add_header X-Content-Type-Options nosniff;
108108
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
109-
add_header Referrer-Policy no-referrer-when-downgrade;
109+
add_header Referrer-Policy strict-origin-when-cross-origin;
110110
# Uses your domain from the server_name above here (or your wildcard *, if you experience any problems)
111111
add_header Access-Control-Allow-Origin 'https://'$server_name;
112112
# Adjust to your needs. GET should be enough for simple landingpages. Sometimes, you might need 'GET, POST'.

templates/header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
}
3737
?>
3838

39-
<!-- Preload fonts (optional, only .woff2 recommended) -->
39+
<!-- Preload fonts (optional, only .woff2 and only the ones you use above the fold recommended) -->
4040
<link rel="preload" href="./assets/fonts/open-sans-v17-latin-regular.woff2" as="font" type="font/woff2" crossorigin>
4141
<link rel="preload" href="./assets/fonts/open-sans-v17-latin-600.woff2" as="font" type="font/woff2" crossorigin>
4242
<link rel="preload" href="./assets/fonts/open-sans-v17-latin-800.woff2" as="font" type="font/woff2" crossorigin>

templates/php_security_headers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
header("X-XSS-Protection: 1; mode=block");
77
header("X-Content-Type-Options: nosniff");
88
header("Strict-Transport-Security: max-age=31536000; includeSubDomains");
9-
header("Referrer-Policy: no-referrer-when-downgrade");
9+
header("Referrer-Policy: strict-origin-when-cross-origin");
1010
header("Access-Control-Allow-Origin: ". $the_page_url);
1111
// Adjust to your needs. GET should be enough for simple landingpages. Sometimes, you might need 'GET, POST'.
1212
header("Access-Control-Allow-Methods: GET");

0 commit comments

Comments
 (0)