by indigodaddy · 2y ago · 0 comments
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
You configure it mostly in HTTP headers, generally at your HTTP server/static asset serving level.
I dislike this about CORS, especially when you'd want to configure it at the web server/ingress level, but suddenly need dynamic logic to return the appropriate header, for example here's an older example I used when fronting some apps with Apache: https://stackoverflow.com/a/22331450
I understand why it's in place (because you probably shouldn't leak all of the allowed domains), but dealing with that can be a bit awkward.