I need to add a custom header to each response sent by nginx for my static-only application. With Apache I'd put the following in a .htaccess file:
Header set Access-Control-Allow-Origin "*"
How do I do it with nginx?
asked Jan 11 '11 at 04:56
Custom headers are not supported by our nginx-based applications. You'll need to use an Apache-based application in order to do this.
answered Jan 11 '11 at 05:03
David L ♦♦
In my way to use CORS on the deploy environment I pointed my API application (Rails in this case) as a subdirectory of a static application (
answered Jul 24 '12 at 15:07