nftstorage / nftstorage.link

🪐 NFT.Storage Gateway, the IPFS gateway for NFT.Storage is not "another gateway", but a caching layer for NFTs that sits on top of existing IPFS public gateways. ***Notice: Uploads have been decommissioned.**** Learn more and find a new hot storage provider for uploading new assets: nft.storage/nft-storage-classic
https://nft.storage/nft-storage-classic
Other
47 stars 10 forks source link

feat: add content security policy header #172

Closed vasco-santos closed 2 years ago

vasco-santos commented 2 years ago

Based on proposal from @Gozala https://gozala.io/workspace/#/page/ipfs%20content-security-policy let's add Content-Security-Policy header to only allow requests within same origin.

This is added to the response from the gateway race before it is cached, so that responses from cache will also have the header already set.

cloudflare-workers-and-pages[bot] commented 2 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 05b00e9
Status: ✅  Deploy successful!
Preview URL: https://052ee5cb.nftstorage-link.pages.dev
Branch Preview URL: https://feat-add-content-security-po.nftstorage-link.pages.dev

View logs