I have a svelte frontend, directus backend. I have now kicked off the frontend over my network, where both svelte and directus are running on a linux VM.
I can access directus from a browser on the host (http://vm-name:8055) and the frontend (http://vm-name:3000). But the front end is not displaying any directus data because of the inevitable CORS issues.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8055/items/artic...... (Reason: CORS request did not succeed).
I have edited the .env file in directus
PORT=8055
PUBLIC_URL="http://localhost:8055"
CORS_ENABLED=true
CORS_ORIGIN="http://localhost:3000", "http://vm-name:3000/"
With previous backends like loopback, I only had to edit the server configuration.
So within the VM, both are running on localhost but the browser is not. What have I done wrong?