Use latest server-configs-test and align requirements

This commit is contained in:
Léo Colombaro 2021-06-29 00:43:34 +02:00
parent 25a569d97d
commit 4a40f258a2
No known key found for this signature in database
GPG Key ID: 687B480A6D4F735F
4 changed files with 9 additions and 5 deletions

View File

@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v2.3.4
- name: Test with server-configs-test
uses: h5bp/server-configs-test@4.0.2
uses: h5bp/server-configs-test@5.0.0
with:
command: test
server: nginx
@ -32,7 +32,7 @@ jobs:
tests: basic-file-access;caching;cache-busting;custom-errors;forbidden-files;precompressed-files-gzip;rewrites;ssl
- name: Benchmark
uses: h5bp/server-configs-test@4.0.2
uses: h5bp/server-configs-test@5.0.0
with:
command: benchmark
server: nginx

View File

@ -12,5 +12,7 @@ location ~* \.svgz$ {
include h5bp/security/x-content-type-options.conf;
include h5bp/security/content-security-policy.conf;
include h5bp/security/referrer-policy.conf;
include h5bp/security/permissions-policy.conf;
include h5bp/security/cross-origin-policy.conf;
include h5bp/cross-origin/requests.conf;
}

View File

@ -124,15 +124,15 @@ http {
# h5bp/security/cross-origin-policy.conf
# Cross-Origin-Embedder-Policy
map $sent_http_content_type $coep_policy {
~*text/(css|html|javascript)|application\/pdf|xml "require-corp";
~*text/(html|javascript)|application/pdf|xml "require-corp";
}
# Cross-Origin-Opener-Policy
map $sent_http_content_type $coop_policy {
~*text/(css|html|javascript)|application\/pdf|xml "same-origin";
~*text/(html|javascript)|application/pdf|xml "same-origin";
}
# Cross-Origin-Resource-Policy
map $sent_http_content_type $corp_policy {
~*text/(css|html|javascript)|application\/pdf|xml "same-origin";
~*text/(html|javascript)|application/pdf|xml "same-origin";
}
# Add Access-Control-Allow-Origin.

View File

@ -20,6 +20,8 @@ server {
gzip_min_length 1;
include h5bp/security/content-security-policy.conf;
include h5bp/security/permissions-policy.conf;
include h5bp/security/cross-origin-policy.conf;
include h5bp/location/web_performance_filename-based_cache_busting.conf;
include h5bp/location/web_performance_svgz-compression.conf;
include h5bp/errors/custom_errors.conf;