Skip to content

chore(server): document why crossOriginEmbedderPolicy is disabled (#350)#351

Merged
CryptoJones merged 1 commit into
masterfrom
chore/server-document-coep-disable
May 19, 2026
Merged

chore(server): document why crossOriginEmbedderPolicy is disabled (#350)#351
CryptoJones merged 1 commit into
masterfrom
chore/server-document-coep-disable

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Closes #350.

Summary

Adds an inline rationale comment for crossOriginEmbedderPolicy: false in server.js's helmet config. Comment-only.

Test plan

  • npm run lint && npm test — 793 passing (no behavior change).

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

The helmet config disables `crossOriginEmbedderPolicy` alongside
the documented `contentSecurityPolicy: false`, but the COEP=false
line had no comment explaining why. A future contributor reading
the block could either assume it was an oversight (and try to
re-enable it) or copy the pattern into a different app without
understanding the constraint.

Add the rationale: Swagger UI at /docs loads theme assets
cross-origin, and helmet's default `require-corp` value blocks
any sub-resource that doesn't explicitly opt into CORP/CORS. Since
this API has no other browser-facing HTML, leaving COEP off is
the lower-risk choice; operators adding embedded dashboards
should configure helmet directly rather than re-enabling COEP
at this layer.

Comment-only — no behavior change, tests stay green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CryptoJones CryptoJones merged commit 56454c8 into master May 19, 2026
3 checks passed
@CryptoJones CryptoJones deleted the chore/server-document-coep-disable branch May 19, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

server.js: crossOriginEmbedderPolicy:false has no inline rationale

1 participant