Hello , I m using redmine api 3.4.6 ( bitnami sack ) , and i m trying to get the list of projects using an angular 6 app, but get this error : "failed to load http://localhost:8080/redmine/projects.json: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. The response had HTTP status code 404" ,
i searched on the internet for the redmine plugin cors but it is not compatible for my redmine version , any ideas?
RE: CORS problem - Added by Ken Zalewski over 5 years ago
Are you running Redmine behind an Apache server with Passenger? If so, you can add some HTTP header configuration lines to your Apache config that will set the appropriate CORS headers.
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS"
Header always set Access-Control-Allow-Headers "*"
Let me know if that helps.