mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
fix(headers): set Cross-Origin-Resource-Policy header for UI requests (#2883)
* fix(headers): set Cross-Origin-Resource-Policy header for UI requests Signed-off-by: Andrei Aaron <aaaron@luxoft.com> * ci: disable stacker tests in ecosystem tools as they do not work on Ubuntu 24 Workaround this: The Ubuntu 22 github free runner is not powerful enough to run all these tests. We need a real fix on stacker side Signed-off-by: Andrei Aaron <aaaron@luxoft.com> --------- Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
@@ -40,6 +40,9 @@ func addUISecurityHeaders(h http.Handler) http.HandlerFunc { //nolint:varnamelen
|
||||
w.Header().Set("Permissions-Policy", permissionsPolicy)
|
||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
w.Header().Set("X-Frame-Options", "DENY")
|
||||
w.Header().Set("Cross-Origin-Resource-Policy", "same-origin")
|
||||
w.Header().Set("Cross-Origin-Embedder-Policy", "require-corp")
|
||||
w.Header().Set("Cross-Origin-Opener-Policy", "same-origin")
|
||||
|
||||
cspDirectives := []string{
|
||||
"default-src 'none'",
|
||||
|
||||
Reference in New Issue
Block a user