CORS problem

Added by abir bn 4 months ago

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?

Replies (1)

RE: CORS problem - Added by Martin Denizet (redmine.org team member) 4 months ago

Hello,
Did you try to add the Access-Control-Allow-Origin header in the Apache virtualhost config?
https://enable-cors.org/server_apache.html
Cheers,

(1-1/1)