Closed bastianhilton closed 1 year ago
@bastianhilton Hey, are you sure that you configured your directus instance right?
I have the default settings of Directus, I haven't changed anything other than make all of my collections read for the api
You should disable CORS on your directus, or add the domain that you are using to the CORS allow settings. https://docs.directus.io/self-hosted/config-options.html#cors
Hello im using your module in my Nuxt 3 application and have the current configurations
directus: { url: process.env.DIRECTUS_URL, auth: { email: process.env.DIRECTUS_EMAIL, password: process.env.DIRECTUS_PASSWORD, token: process.env.DIRECTUS_TOKEN, } },
in my env file:
DIRECTUS_URL='http://example.com:8055/' DIRECTUS_TOKEN='-' DIRECTUS_EMAIL=support@example.com DIRECTUS_PASSWORD=Example@password //not real credentials just an example for the env.
cors error in dev console:
Access to fetch at http://example.com:8055 from origin 'http://localhost:3011' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I have selected all of my collections to have read access
Any idea what could be happening here?