Shopify / shopify-app-template-node

MIT License
890 stars 402 forks source link

Add use of cspHeaders middleware #1255

Closed mkevinosullivan closed 1 year ago

mkevinosullivan commented 1 year ago

WHY are these changes introduced?

Template doesn't explicitly set Content-Security-Policy header via the Express.js library's cspHeaders middleware.

Note that ensureInstalledOnShop also adds the header internally, which is why the vanilla template works as-is.

Fixes #1239

WHAT is this pull request doing?

This commit adds the cspHeaders middleware to the app stack.

Checklist