2021-11-08 19:15:57 -06:00
|
|
|
# vim: ft=caddyfile
|
|
|
|
|
|
|
|
search.bbaovanc.com {
|
|
|
|
import hsts
|
|
|
|
|
|
|
|
@api {
|
|
|
|
path /config
|
2022-05-23 02:40:11 -05:00
|
|
|
path /healthz
|
|
|
|
path /stats/errors
|
|
|
|
path /stats/checker
|
2021-11-08 19:15:57 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
@static {
|
|
|
|
path /static/*
|
|
|
|
}
|
|
|
|
|
2022-05-23 02:40:11 -05:00
|
|
|
@notstatic {
|
|
|
|
not path /static/*
|
2021-11-08 19:15:57 -06:00
|
|
|
}
|
|
|
|
|
2022-05-23 02:40:11 -05:00
|
|
|
@imageproxy {
|
|
|
|
path /image_proxy/*
|
|
|
|
}
|
|
|
|
|
|
|
|
@notimageproxy {
|
|
|
|
not path /image_proxy/*
|
2021-11-08 19:15:57 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
header {
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
# Disable some features
|
2022-05-23 02:40:11 -05:00
|
|
|
Permissions-Policy "accelerometer=(),ambient-light-sensor=(),autoplay=(),camera=(),encrypted-media=(),focus-without-user-activation=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),midi=(),payment=(),picture-in-picture=(),speaker=(),sync-xhr=(),usb=(),vr=()"
|
2021-11-08 19:15:57 -06:00
|
|
|
|
|
|
|
# Disable some features (legacy)
|
|
|
|
Feature-Policy "accelerometer 'none';ambient-light-sensor 'none'; autoplay 'none';camera 'none';encrypted-media 'none';focus-without-user-activation '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'"
|
|
|
|
|
|
|
|
# Referer
|
|
|
|
Referrer-Policy "no-referrer"
|
|
|
|
|
|
|
|
# X-Robots-Tag
|
|
|
|
X-Robots-Tag "noindex, noarchive, nofollow"
|
2022-05-23 02:40:11 -05:00
|
|
|
|
|
|
|
# Remove Server header
|
|
|
|
#-Server
|
2021-11-08 19:15:57 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
header @api {
|
|
|
|
Access-Control-Allow-Methods "GET, OPTIONS"
|
|
|
|
Access-Control-Allow-Origin "*"
|
|
|
|
}
|
|
|
|
|
2022-05-23 02:40:11 -05:00
|
|
|
# Cache
|
2021-11-08 19:15:57 -06:00
|
|
|
header @static {
|
2022-05-23 02:40:11 -05:00
|
|
|
# Cache
|
2021-11-08 19:15:57 -06:00
|
|
|
#Cache-Control "public, max-age=31536000"
|
2022-05-23 02:40:11 -05:00
|
|
|
Test working
|
|
|
|
defer
|
|
|
|
}
|
|
|
|
|
|
|
|
header @notstatic {
|
|
|
|
# No Cache
|
|
|
|
Cache-Control "no-cache, no-store"
|
|
|
|
Pragma "no-cache"
|
2021-11-08 19:15:57 -06:00
|
|
|
}
|
|
|
|
|
2022-05-23 02:40:11 -05:00
|
|
|
# CSP (see http://content-security-policy.com/ )
|
|
|
|
header @imageproxy {
|
|
|
|
Content-Security-Policy "default-src 'none'; img-src 'self' data:"
|
2021-11-08 19:15:57 -06:00
|
|
|
}
|
|
|
|
|
2022-05-23 02:40:11 -05:00
|
|
|
header @notimageproxy {
|
|
|
|
Content-Security-Policy "upgrade-insecure-requests; default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'self' https://github.com/searxng/searxng/issues/new; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; connect-src 'self' https://overpass-api.de; img-src 'self' data: https://*.tile.openstreetmap.org; frame-src https://www.youtube-nocookie.com https://player.vimeo.com https://www.dailymotion.com https://www.deezer.com https://www.mixcloud.com https://w.soundcloud.com https://embed.spotify.com"
|
2021-11-08 19:15:57 -06:00
|
|
|
}
|
|
|
|
|
2022-05-23 02:40:11 -05:00
|
|
|
# SearXNG
|
2021-11-08 19:15:57 -06:00
|
|
|
handle {
|
2022-05-23 02:40:11 -05:00
|
|
|
encode zstd gzip
|
|
|
|
reverse_proxy localhost:88 {
|
2021-11-08 19:15:57 -06:00
|
|
|
header_up X-Forwarded-Port {http.request.port}
|
2022-05-23 02:40:11 -05:00
|
|
|
header_up X-Forwarded-Proto {http.request.scheme}
|
2021-11-08 19:15:57 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
import basicerrors
|
2022-04-02 23:27:31 -05:00
|
|
|
}
|