ci: add site pipeline
This commit is contained in:
34
nginx/nginx.conf
Normal file
34
nginx/nginx.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
server_tokens off;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1024;
|
||||
gzip_types text/css application/javascript image/svg+xml application/json;
|
||||
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
|
||||
# Only these paths are served; .git, tools/, README.md, images/ etc. return 404.
|
||||
location = / {
|
||||
try_files /index.html =404;
|
||||
add_header Cache-Control "no-cache" always;
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
}
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache" always;
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
}
|
||||
location ~ ^/(favicon\.svg|robots\.txt)$ {
|
||||
add_header Cache-Control "public, max-age=86400" always;
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
}
|
||||
location ^~ /assets/ {
|
||||
add_header Cache-Control "public, max-age=3600" always;
|
||||
include /etc/nginx/snippets/security-headers.conf;
|
||||
}
|
||||
location / {
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
5
nginx/security-headers.conf
Normal file
5
nginx/security-headers.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
add_header Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'; manifest-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'" 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 Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
Reference in New Issue
Block a user