ponysearch-docker/Caddyfile

70 lines
1.9 KiB
Caddyfile
Raw Normal View History

{$SEARX_PROTOCOL}{$SEARX_HOSTNAME} {
2019-07-01 16:26:12 +02:00
tls self_signed
gzip {
not /morty
}
2019-07-01 16:26:12 +02:00
root /srv
header / {
# Enable HTTP Strict Transport Security (HSTS) to force clients to always
# connect via HTTPS
# Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
# Enable cross-site filter (XSS) and tell browser to block detected attacks
X-XSS-Protection "1; mode=block"
# Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
X-Content-Type-Options "nosniff"
# Disallow the site to be rendered within a frame (clickjacking protection)
X-Frame-Options "SAMEORIGIN"
2019-07-02 18:23:20 +02:00
# CSP (see http://content-security-policy.com/ )
Content-Security-Policy "default-src 'self'; worker-src 'none'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; connect-src 'self' https://overpass-api.de; img-src 'self' data: https://*.tile.openstreetmap.org; frame-src http://www.youtube-nocookie.com http://player.vimeo.com http://www.dailymotion.com"
2019-07-01 16:26:12 +02:00
#
Access-Control-Allow-Methods "GET, POST, OPTIONS"
Access-Control-Allow-Origin "*"
# Disable some features
Feature-Policy "accelerometer 'none';autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';midi 'none';notifications 'none';payment 'none';push 'none';speaker 'none';sync-xhr 'none';usb 'none';vibrate 'none';vr 'none'"
# Cache
Cache-Control "no-cache, no-store, must-revalidate"
2019-07-01 16:26:12 +02:00
Pragma "no-cache"
# Referer
Referrer-Policy "no-referrer"
# X-Robots-Tag
X-Robots-Tag "noindex, noarchive, nofollow"
2019-07-01 16:26:12 +02:00
# Remove Server header
-Server
}
header /static {
Cache-Control "public, max-age=31536000"
-Pragma
}
proxy / 127.0.0.1:4040 {
transparent
2019-07-01 16:26:12 +02:00
}
basicauth /filtron {$FILTRON_USER} {$FILTRON_PASSWORD}
proxy /filtron/rules 127.0.0.1:4041 {
without /filtron
}
proxy /morty 127.0.0.1:3000
limits {
header 100KB
body / 100KB
body /morty 5MB
2019-07-01 16:26:12 +02:00
}
}