What are the cons and the pro for handling CORS in infrastructure or application ?
I mean is it better to setup CORS on my nginx/apache/tomcat ? or to handle it by coding in my application ?
I have three API REST running with their own language (java spring, express and php) behind a nginx reverse proxy. I have access to the code and to the nginx configuration.
When do i must avoid to handle CORS in my infrastructure (configuration)? When do i must avoid to handle CORS in my application (code)?