Fix cross-origin embedding of public sign-in icons #9
Loading…
Reference in a new issue
No description provided.
Delete branch "camila/public-icon-corp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause
Helmet sends
Cross-Origin-Resource-Policy: same-origineven for the public icons. Forgejo embeds them from a different origin, so Firefox rejects the successful SVG response withNS_ERROR_DOM_CORP_FAILED.Fix
Cross-Origin-Resource-Policy: cross-originfor exactly the black/white hoplite SVG paths, after helmet and before static serving.Verification
go vet ./...,go test ./...,git diff --check: pass.go vet ./...andgo test -race ./....Deployment is still required. Browsers may retain the old header for up to the existing 3600-second asset cache lifetime; reload with cache disabled or append
?v=2to the icon URL after deployment.