DieSchittigs / contao-content-api-bundle

Contao JSON-API
MIT License
41 stars 9 forks source link

Allow configuration of CORS-Parameter #8

Closed csariva closed 5 years ago

csariva commented 5 years ago

If you host contao on an other server than the SPA i get the following error while calling the REST-API:

Access to XMLHttpRequest at 'http://contao.localhost.local/api/' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is it possible to add the configuration of allowed origins?