News for hackers. Stuff that matters.
Re:Cache your CORS by tomjakubowski on Tuesday September 20, 2022 @05:38PM (#32918141)
> you want to serve your API from the same origin as your static files (HTML, CSS, JS, etc.)

What is the benefit or purpose of doing this?

Re:Cache your CORS by icedchai on Tuesday September 20, 2022 @06:27PM (#32918633)
You don't have CORS configuration to worry about. It simplifies development and deployment.
Re:Cache your CORS by tomjakubowski on Tuesday September 20, 2022 @09:18PM (#32919871)
You don't need to set up CORS to load assets on a page from a CDN's origin. Cross-origin taint only matters when trying to read asset data from a script.

I think we may be talking past each other and one of us is misunderstanding OP.

Re:Cache your CORS by icedchai on Tuesday September 20, 2022 @10:16PM (#32920164)
Yes, but you need it if your API isn't on the same origin as your static assets.