1

I am using Swisscom Application Cloud (based on Cloudfoundry). I deployed an app usign Static Buildpack and the idea is that this app delivery a JSON file. As soon as I try to access the remote JSON file from a AngularJS application with a GET call, I get a 405 Method Not Allowed on the OPTIONS call. I think it is a CORS issue. Is there anyone out there having an idea how I can make sure that CORS is handled properly by my Static Buildpack app? Is there anyway I can define this in my manifest.yml?

Greets, Marc

1 Answer 1

2

Without having tried it myself, I guess you can achieve this by providing a custom nginx configuration (http://docs.cloudfoundry.org/buildpacks/staticfile/#custom_nginx_configuration) containing CORS settings.

Nginx CORS examples: https://serverfault.com/questions/162429/how-do-i-add-access-control-allow-origin-in-nginx/

Sign up to request clarification or add additional context in comments.

1 Comment

thanks a lot for your help Matthias. It worked by providing an own nginx.conf within the deployed app.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.