mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
49 lines
1.4 KiB
Caddyfile
49 lines
1.4 KiB
Caddyfile
(compression_config) {
|
|
gzip
|
|
}
|
|
|
|
(base_config) {
|
|
header / {
|
|
Content-Security-Policy "
|
|
base-uri 'self';
|
|
connect-src 'self' commento.msfjarvis.dev;
|
|
default-src 'self';
|
|
frame-ancestors 'none';
|
|
frame-src https://github.com;
|
|
font-src 'self' data: commento.msfjarvis.dev stackpath.bootstrapcdn.com;
|
|
img-src 'self' data: gfycat.com imgur.com *.imgur.com commento.msfjarvis.dev *.amazonaws.com;
|
|
object-src 'none';
|
|
script-src 'self' commento.msfjarvis.dev 'unsafe-inline';
|
|
style-src 'self' commento.msfjarvis.dev stackpath.bootstrapcdn.com 'unsafe-inline';
|
|
"
|
|
# Security related changes stolen from https://github.com/searx/searx-docker/blob/master/Caddyfile
|
|
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
|
X-XSS-Protection "1; mode=block"
|
|
X-Content-Type-Options "nosniff"
|
|
X-Frame-Options "SAMEORIGIN"
|
|
Feature-Policy "accelerometer 'none'; autoplay 'none';camera 'none';encrypted-media 'none'; geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';midi 'none';payment 'none';picture-in-picture 'none';sync-xhr 'none';usb 'none'"
|
|
Referrer-Policy "no-referrer"
|
|
}
|
|
}
|
|
|
|
(proxy_config) {
|
|
try_duration 5s
|
|
transparent
|
|
}
|
|
|
|
:2015 {
|
|
tls off
|
|
import base_config
|
|
import compression_config
|
|
proxy / http://localhost:1313 {
|
|
import proxy_config
|
|
}
|
|
}
|
|
|
|
:2016 {
|
|
tls off
|
|
import base_config
|
|
import compression_config
|
|
root public
|
|
}
|