matrix-org / matrix.to

A simple stateless privacy-protecting URL redirecting service for Matrix
http://matrix.to
Apache License 2.0
886 stars 189 forks source link

Add Cloudflare Pages headers file #315

Open laurencegill opened 1 year ago

laurencegill commented 1 year ago

PoC - disable the default behaviour of adding access-control-allow-origin: * to pages sites

Enable ACAO only for static /images/

Available at:

https://cf-pages-headers.matrix-to-asy.pages.dev/

The deployment mechanism probably needs looking at (writing into the build.js file).

Reference:

https://github.com/vector-im/sre-internal/issues/2606

laurencegill commented 11 months ago

@bwindels can we merge this?

t3chguy commented 11 months ago

@laurencegill this seems like it'll break Netlify deploys? Surely it shouldn't be done by the build script unless its happening for CFP?

t3chguy commented 11 months ago

Not sure why this repo uses Netlify & CFP for PR previews, likely Netlify can just be disabled a this point

laurencegill commented 11 months ago

Not sure why this repo uses Netlify & CFP for PR previews, likely Netlify can just be disabled a this point

I'm not sure if Netlify is still used or not, if not we can disable it