mirror of
https://github.com/msfjarvis/server-config
synced 2025-08-14 14:07:02 +05:30

focus-without-user-activation is still pending adoption by every browser except Chrome and the corresponding w3c issue[1] is still open and active. [1]: https://github.com/w3c/webappsec-feature-policy/issues/273 Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
75 lines
2 KiB
Caddyfile
75 lines
2 KiB
Caddyfile
(compression_config) {
|
|
gzip
|
|
}
|
|
|
|
(base_config) {
|
|
tls {
|
|
dns cloudflare
|
|
}
|
|
header / {
|
|
# 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';ambient-light-sensor 'none'; autoplay 'none';camera 'none';encrypted-media 'none'; geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';midi 'none';payment 'none';picture-in-picture 'none'; speaker 'none';sync-xhr 'none';usb 'none';vr 'none'"
|
|
Referrer-Policy "no-referrer"
|
|
}
|
|
}
|
|
|
|
(proxy_config) {
|
|
try_duration 5s
|
|
transparent
|
|
}
|
|
|
|
https://msfjarvis.website {
|
|
import base_config
|
|
import compression_config
|
|
root /var/www/msfjarvis.website/
|
|
redir 307 {
|
|
/github https://github.com/msfjarvis
|
|
/brave https://brave.com/msf756
|
|
}
|
|
git {
|
|
repo https://github.com/msfjarvis/msfjarvis.website
|
|
branch src
|
|
path ../site_raw
|
|
hook /githook {$WEBHOOK_PASSWORD}
|
|
then git submodule update --init --recursive
|
|
then hugo --destination=/var/www/msfjarvis.website
|
|
}
|
|
}
|
|
|
|
https://build.msfjarvis.website {
|
|
import base_config
|
|
import compression_config
|
|
proxy / http://localhost:8080 {
|
|
import proxy_config
|
|
}
|
|
}
|
|
|
|
https://docker.msfjarvis.website {
|
|
import base_config
|
|
import compression_config
|
|
proxy / http://localhost:9000 {
|
|
import proxy_config
|
|
}
|
|
}
|
|
|
|
https://download.msfjarvis.website {
|
|
import base_config
|
|
root /var/www/download.msfjarvis.website
|
|
fastcgi / /run/php/php7.2-fpm.sock php
|
|
rewrite {
|
|
if {path} ends_with /
|
|
to {dir}/index.html {dir}/index.php /_h5ai/public/index.php
|
|
}
|
|
}
|
|
|
|
https://git.msfjarvis.website {
|
|
import base_config
|
|
import compression_config
|
|
proxy / http://localhost:8000 {
|
|
import proxy_config
|
|
}
|
|
}
|