Skip to content

Commit b8e8003

Browse files
committed
tests sécurisation headers
1 parent 341cdae commit b8e8003

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.docker/nginx.apps.conf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ server {
66
root /usr/share/nginx/html;
77

88
server_tokens off;
9-
9+
1010
location ~ /index.html|.*\.toml|.*\.json$ {
1111
expires -1;
1212
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
1313
add_header X-Frame-Options DENY;
1414
add_header X-Content-Type-Options nosniff;
15+
add_header Referrer-Policy strict-origin;
16+
add_header Permissions-Policy "geolocation=(), microphone=(), camera=(), payment=()";
17+
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
1518
}
1619

1720
location ~ .*\.css$|.*\.js$ {
@@ -26,8 +29,6 @@ server {
2629
try_files $uri $uri/ /index.html;
2730

2831
add_header Cache-Control 'max-age=86400'; # 24h
29-
add_header X-Frame-Options DENY;
30-
add_header X-Content-Type-Options nosniff;
3132
}
3233

3334
error_page 500 502 503 504 /50x.html;

0 commit comments

Comments
 (0)