Hacker News new | ask | show | jobs
by thr0wnawaytod4y 1367 days ago
Could have other sec consequences, e.g. XSS in the API is now all of a sudden exploitable, just an example
1 comments

There are solutions for that; for example, it can also be avoided in prod by having a JS-specific subdomain that's the only domain whitelisted by the CSP, separate from the main API. HTTP/2 connection pools should be recycled and simple <script> inclusions don't require CORS so I don't expect many downsides. As an added bonus, such a configuration would be easier to use in combination with a CDN.