这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@mbledkowski
Copy link
Contributor

HSTS is required to achieve a good score in the Mozilla Observatory test (https://developer.mozilla.org/en-US/observatory/analyze), which is one of the criteria on the https://searx.space instance list.
Caddyfile has been updated to enable the HTTP Strict Transport Security, with six months cache.

Best regards,
Maciej Błędkowski

@mbledkowski
Copy link
Contributor Author

docker restart caddy is required to see the results of this change

Copy link
Member

@inetol inetol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please comment this security feature.

Caddyfile Outdated
X-Robots-Tag "noindex, nofollow, noarchive, nositelinkssearchbox, nosnippet, notranslate, noimageindex"

# enable HSTS
Strict-Transport-Security max-age=15768000;
Copy link
Member

@inetol inetol Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason this option was removed in commits later is that HSTS is not for everyone by default. As MDN:

Once this value is set, the site must continue to support HTTPS until the expiry time is reached.

Client can no longer access the site if you decide (as the host) to use HTTP proto only, unless the client also voids the HSTS timer on their browser.

@mbledkowski
Copy link
Contributor Author

I have commented it out

@mbledkowski
Copy link
Contributor Author

The other option would be to use value like 300 seconds, as it would still be possible to get an A+ score with this value.

@inetol
Copy link
Member

inetol commented Aug 15, 2025

The other option would be to use value like 300 seconds, as it would still be possible to get an A+ score with this value.

The Observatory rating can change at any time, so we shouldn't focus too much on that, but rather on giving a middle ground. HSTS with age values lower than 1 month doesn't make sense, 6 months seems pretty reasonable to me and is just enough to get a neutral rating.

@inetol inetol merged commit d9357ac into searxng:master Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants