1
0
Fork 0

Add header "Referrer-Policy: no-referrer"

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
This commit is contained in:
Frédéric Guillot 2021-02-14 11:16:06 -08:00 committed by fguillot
parent 04f9c456d5
commit 091308787b

View file

@ -97,6 +97,7 @@ func (b *Builder) writeHeaders() {
b.headers["X-Content-Type-Options"] = "nosniff"
b.headers["X-Frame-Options"] = "DENY"
b.headers["Content-Security-Policy"] = "default-src 'self'; img-src * data:; media-src *; frame-src *"
b.headers["Referrer-Policy"] = "no-referrer"
for key, value := range b.headers {
b.w.Header().Set(key, value)