Continuous Integration / lighthouse (pull_request) Canceled after 0s
Continuous Integration / deploy-test (pull_request) Canceled after 0s
Continuous Integration / deploy-production (pull_request) Canceled after 0s
Continuous Integration / check (pull_request) Canceled after 2m22s
Sentry loads after the page and reports errors only, without personal data; Umami counts visits per environment. Both only run on andreaslop.nl and test.andreaslop.nl. The CSP allows just these two hosts, and builds carry the commit SHA as release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
64 lines
4.3 KiB
Plaintext
64 lines
4.3 KiB
Plaintext
# Gegenereerd door web/config/serverConfig.ts (pnpm server-config). Niet handmatig aanpassen.
|
|
# Test-omgeving op de Raspberry Pi, achter de reverse-proxy-Pi (die TLS afhandelt
|
|
# met certbot). De proxy moet de Host-header doorgeven (proxy_set_header Host
|
|
# $host), anders kiest nginx hier het standaardblok (WordPress).
|
|
# Eigen server-blok naast de WordPress-site: bewust geen default_server, zodat
|
|
# dit blok alleen de testhostname beantwoordt.
|
|
# Pas server_name en root aan aan de server; de rest komt uit de generator.
|
|
server {
|
|
listen 80;
|
|
server_name test.andreaslop.nl;
|
|
root /var/www/html/andreaslop-test;
|
|
index index.html;
|
|
|
|
# Achter de reverse proxy: doorverwijzingen relatief houden, anders stuurt
|
|
# nginx naar zijn eigen http://-adres in plaats van de https-hostname
|
|
absolute_redirect off;
|
|
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://analytics.slpsoftware.nl; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://analytics.slpsoftware.nl https://o4511795618185216.ingest.de.sentry.io; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
|
add_header Cache-Control "no-cache" always;
|
|
|
|
# Testsite nooit indexeren
|
|
location = /robots.txt {
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://analytics.slpsoftware.nl; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://analytics.slpsoftware.nl https://o4511795618185216.ingest.de.sentry.io; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
|
default_type text/plain;
|
|
return 200 "User-agent: *\nDisallow: /\n";
|
|
}
|
|
|
|
# Bestanden met een hash in de naam: lang cachen
|
|
location /assets/ {
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://analytics.slpsoftware.nl; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://analytics.slpsoftware.nl https://o4511795618185216.ingest.de.sentry.io; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
|
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# SPA-fallback: onbekende paden krijgen index.html (de router toont de 404).
|
|
# =404 aan het eind: zonder index.html (lege map) een 404 in plaats van een
|
|
# doorverwijzingslus die nginx als 500 afbreekt
|
|
location / {
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://analytics.slpsoftware.nl; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://analytics.slpsoftware.nl https://o4511795618185216.ingest.de.sentry.io; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "DENY" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header X-Robots-Tag "noindex, nofollow" always;
|
|
add_header Cache-Control "no-cache" always;
|
|
try_files $uri $uri/ /index.html =404;
|
|
}
|
|
}
|