{# code: language=ansible-jinja #} # THIS FILE IS MANAGED BY ANSIBLE {% if 'searxng' in apps_include %} {{ apps_vars.searxng.domain }} { tls {{ tls_email }} log { output discard } @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 { Strict-Transport-Security "max-age=31536000; includeSubDomains" X-Content-Type-Options "nosniff" 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=(),interest-cohort=()" Referrer-Policy "no-referrer" X-Robots-Tag "noindex, noarchive, nofollow" -Server } 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' 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" } handle { encode zstd gzip reverse_proxy searxng:8080 { header_up X-Forwarded-Port {http.request.port} header_up X-Forwarded-Proto {http.request.scheme} header_up X-Real-IP {remote_host} } } } {% endif %}