Skip to content

Commit a1dd4ab

Browse files
committed
Set referrer policy to avoid leaking URL auth params
We're only leaking these to ourselves (strict-origin-when-cross-origin is the default, which is equivalent to this for connections elsewhere) and the auth token is only useful if you can access the local-only CORS-blocked local admin port, but it's still a good idea not to let it leave the machine.
1 parent a593641 commit a1dd4ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Caddyfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
header @get Cache-Control "public, max-age=60, stale-while-revalidate=600, stale-if-error=86400"
1717

1818
header Content-Security-Policy "frame-ancestors 'none'"
19+
header Referrer-Policy "strict-origin"
20+
1921
header X-Clacks-Overhead "GNU Terry Pratchett" # https://xclacksoverhead.org
2022
}

0 commit comments

Comments
 (0)