directus-labs / agency-os

The open source operating system for digital agencies. Built with Directus and Nuxt.
https://agencyos.dev
MIT License
604 stars 117 forks source link

CORS Missing Allow Origin With AgencyOS and Directus #116

Open BradPerbs opened 3 months ago

BradPerbs commented 3 months ago

I've freshly installed Directus with AgencyOS and I'm getting CORS Missing Allow Origin when navigating through the pages.

If I reload the page then it loads, but when navigating for example using the menu, it returns CORS Missing Allow Origin.

Test url: https://new.reputazi.com/

omgitsjan commented 2 months ago

Do you have configured the CORS settings in the env in your Directus development, as they say in the documentation? (https://docs.directus.io/self-hosted/config-options.html#cors)

On my side, it works with these settings in the Directus Env:

CORS_ENABLED: 'true'
CORS_ORIGIN: 'true'
PUBLIC_URL: 'YOUR_DEPLOYED_URL'
rantoniuk commented 2 months ago

I just battled with the same in my env:

here is what worked for me on directus side:

      CORS_ENABLED: 'true'
      CORS_ORIGIN: 'https://www.domain.com'