Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No 'Access-Control-Allow-Origin' --- NUXT #500

Closed
j17hernandez opened this issue May 20, 2021 · 2 comments
Closed

No 'Access-Control-Allow-Origin' --- NUXT #500

j17hernandez opened this issue May 20, 2021 · 2 comments

Comments

@j17hernandez
Copy link

Hola, estoy intentando conectar backend django con frontend Nuxt, cuando intento hacer uan petición me aparece este problema en la consola:

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

Mi configuración es esta

modules: [
['@nuxtjs/axios'],
]

axios: {
baseURL: 'http://localhost:8000/api',
proxyHeaders: false,
credentials: false,
},

@FearHeim
Copy link

FearHeim commented Jun 6, 2021

Lograste resolver el problema?

@j17hernandez
Copy link
Author

Hola @FearHeim , si era algo en backend, estoy usando Django

Al momento de hacer el endpoint me mostraba ese error en consola, luego de haber instalado corsheaders y haberlo configurado dejó de salir el error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants