CORS error with api calls

Hello,

When i’m trying to consume the api to get an access token from a js script in a different port than xibo-cms i’ve got an error about Cross-origin request. How can I do to configure allow api requests from my website ?

Thanks,

I tried to use a custom cms.conf file to add headers in apache, but i still get the same error. I think i’m close to the solution but i’m running out of ideas… if someone could give me a pointer that would be great.

Here is my cms.conf

This is what made the difference for me:

RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
1 Like

I still get the error even with this. Where did you put those lines exactly?

Okay… my issue came of my client, previously i was using CMS Cloud and to consume the api i used HTTPS protocol, but now that i use docker i have to use HTTP protocol instead.