feat: added searXNG to Ceres

This commit is contained in:
Nick 2025-03-08 02:39:46 -06:00
parent f3e8f1a77d
commit b7a0f8c314

View file

@ -149,7 +149,55 @@ in
virtualHosts = {
"${host}" = {
extraConfig = ''
handle /* {
@api {
path /config
path /healthz
path /stats/errors
path /stats/checker
}
@static {
path /static/*
}
@notstatic {
not path /static/*
}
@imageproxy {
path /image_proxy
}
@notimageproxy {
not path /image_proxy
}
header @api {
Access-Control-Allow-Methods "GET, OPTIONS"
Access-Control-Allow-Origin "*"
}
header @static {
Cache-Control "public, max-age=31536000"
defer
}
header @notstatic {
Cache-Control "no-cache, no-store"
Pragma "no-cache"
}
header @imageproxy {
Content-Security-Policy "default-src 'none'; img-src 'self' data:"
}
header @notimageproxy {
Content-Security-Policy "upgrade-insecure-requests; default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'self'; 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"
}
handle {
encode zstd gzip
reverse_proxy unix/${config.services.searx.uwsgiConfig.socket} {
transport unix
transport protocol uwsgi
@ -157,15 +205,6 @@ in
}
tls ${service.ssl.cert} ${service.ssl.key}
encode zstd gzip
header {
Strict-Transport-Security "max-age=31536000;"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
Referrer-Policy "no-referrer-when-downgrade"
}
'';
};
};