[mod] container: replace uWSGI with Granian (#395)

To sync with https://github.com/searxng/searxng/pull/4820
This commit is contained in:
Ivan Gabaldon
2025-07-04 14:35:43 +02:00
committed by GitHub
parent fc51db2367
commit 8b75609524
4 changed files with 9 additions and 37 deletions

View File

@@ -42,10 +42,6 @@ encode zstd gzip
path /stats/checker
}
@search {
path /search
}
@imageproxy {
path /image_proxy
}
@@ -58,20 +54,17 @@ header {
# CSP (https://content-security-policy.com)
Content-Security-Policy "upgrade-insecure-requests; default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'self' https:; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; connect-src 'self'; img-src * data:; frame-src https:;"
# Disable some browser features
# Disable browser features
Permissions-Policy "accelerometer=(),camera=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),payment=(),usb=()"
# Set referrer policy
Referrer-Policy "no-referrer"
# Force clients to use HTTPS
Strict-Transport-Security "max-age=31536000"
# Only allow same-origin requests
Referrer-Policy "same-origin"
# Prevent MIME type sniffing from the declared Content-Type
X-Content-Type-Options "nosniff"
# X-Robots-Tag (comment to allow site indexing)
X-Robots-Tag "noindex, noarchive, nofollow"
# Comment header to allow indexing by search engines
X-Robots-Tag "noindex, nofollow, noarchive, nositelinkssearchbox, nosnippet, notranslate, noimageindex"
# Remove "Server" header
-Server
@@ -84,14 +77,10 @@ header @api {
route {
# Cache policy
header Cache-Control "max-age=0, no-store"
header @search Cache-Control "max-age=5, private"
header @imageproxy Cache-Control "max-age=604800, public"
header Cache-Control "max-age=0, public, must-revalidate"
header @imageproxy Cache-Control "max-age=3600, public"
header @static Cache-Control "max-age=31536000, public, immutable"
}
# SearXNG
reverse_proxy localhost:8080 {
# https://github.com/searx/searx-docker/issues/24
header_up Connection "close"
}
reverse_proxy localhost:8080