Comments (7)
added
CORS_ENABLED: true
to docker-compose.yml and now it's working @jbool24
from agency-os.
@franforlizzi I had this ENV setting from the beginning. But it looks like it had more to do with docker volumes and caching I had in the DB. I did a fresh install of the whole stack and it worked correctly.
from agency-os.
@jofmi yes confirming I am actually hitting the backend. All non-auth'd public pages are working. It's only on the
/portal
section I'm getting issues. In the browser console I can see the pre-flight requests and subsequent real POST request for the login failing with a CORS error. I used the default docker-compose inside '.directus' dir of this repo. I'm sure it's something easy I'm overlooking.You don't have a proxy (on nuxt.config) setup for the front-end dev server, do you? You just hit 'http://localhost:{PORT}' on the front end app, right? Because I also tried setting up a local lookup with dnsmasq to make
example.test
resolve to localhost so that I could add 'http://example.test:3000' to the CORS_ORIGIN whitelist. That didn't make things work either.
same problem here!
from agency-os.
Are you hosting locally? I can't manage to get CORS to behave and let me into the portal. Wondering how you tested to get to login successfully (albeit having to change the hard-coded values in the LoginForm.vue component (that part is easy refactor for production use case) I just want to see the portal and haven't been able to get in.
from agency-os.
Hi @jbool24! Yes, I am hosting locally and experienced no problems with CORS. Often, it appears as a CORS error if the server can't reached. Have you checked that directus is running and available under the address that you put in your .env
file? And are you using the same docker-compose file as provided in this repository?
from agency-os.
@jofmi yes confirming I am actually hitting the backend. All non-auth'd public pages are working. It's only on the /portal
section I'm getting issues. In the browser console I can see the pre-flight requests and subsequent real POST request for the login failing with a CORS error. I used the default docker-compose inside '.directus' dir of this repo. I'm sure it's something easy I'm overlooking.
You don't have a proxy (on nuxt.config) setup for the front-end dev server, do you? You just hit 'http://localhost:{PORT}' on the front end app, right? Because I also tried setting up a local lookup with dnsmasq to make example.test
resolve to localhost so that I could add 'http://example.test:3000' to the CORS_ORIGIN whitelist. That didn't make things work either.
from agency-os.
Very strange! Yes, I just hit localhost:3000.
from agency-os.
Related Issues (20)
- directus apply template doesn't work HOT 3
- Auto Selection Based on Current HOT 1
- Images cannot be loaded, files path not found HOT 4
- This module cannot be imported in server runtime || og-image not showing HOT 5
- docker compose on MacOS: "chown: changing ownership of '/var/lib/postgresql/data': Permission denied" HOT 1
- dockerfile support HOT 2
- Extend globals HOT 1
- Pages navigation don't load page content HOT 1
- Unable to Load Images in Portal Due to 403 Error Despite Administrator Access HOT 10
- Image Outline Issue on Initial Load in `block_columns` Component
- [Question] Blog Posts - No Pagination
- publish module HOT 1
- Nuxt Frontend fails to run in development or production, Circular dependency issue `Export "useNitroApp"` HOT 1
- 404 error frontend when launching on vercel HOT 4
- Each page that uses [...permalink] gives 404 since latest Directus update? HOT 1
- Issue: Errors Encountered During Static Website Generation
- Adding Elestio as deployment option
- CORS Missing Allow Origin With AgencyOS and Directus HOT 2
- User not staying logged in after page refresh HOT 2
- You don't have permission to access this.", extensions: [Object] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agency-os.