mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
71c877a67f
- replace token-based launcher auth with password-based login and sessions - migrate legacy launcher_token values into bcrypt-backed password storage - add one-shot local auto-login bootstrap - update config UI, i18n strings, docs, and auth-related tests
13 lines
417 B
Go
13 lines
417 B
Go
package middleware
|
|
|
|
import "net/http"
|
|
|
|
// ReferrerPolicyNoReferrer sets Referrer-Policy: no-referrer on every response
|
|
// so sensitive paths and query parameters are not leaked via the Referer header.
|
|
func ReferrerPolicyNoReferrer(next http.Handler) http.Handler {
|
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Referrer-Policy", "no-referrer")
|
|
next.ServeHTTP(w, r)
|
|
})
|
|
}
|