Closed MichaelJCole closed 9 years ago
Hi there. I recommend posting your question on StackOverflow, where you will find a lot more nginx and CORS experts who can help. If you discover any improvements that can be made to the code on the site, feel free to open a new issue or submit a patch. Thank you!
Hi, I'm using Dokku to host my app at DigitalOcean. Dokku runs nginx 1.6 to proxy Docker apps simulating a Heroku-like environment. The app's all share similar default configs like below.
My Node.js server uses CORS middleware to tell the browser to allow www.myapp.com to make calls to api.myapp.com:
This works fine on my local computer. When I deploy it, I'm getting a CORS error in the browser:
I found your nginx CORS config but I'd prefer a simpler config that just passes the Nodejs response headers through. My app doesn't need nginx to intercept them. How can I configure that?
Thanks!
App nginx.conf's: