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

403 Error after build #69

Open
getdodam opened this issue Apr 16, 2023 · 1 comment
Open

403 Error after build #69

getdodam opened this issue Apr 16, 2023 · 1 comment
Labels
question Further information is requested

Comments

@getdodam
Copy link

I am building a monolith platform of django backend and vue frontend with vite (django-vite). For authentication, I am using session authentication on django side and vue can get user info by djoser or template props (?).

When in DEV mode (localhost:8000 for django server and localhost:5173 for vue), no issues of any axios calls(GET, POST, PATCH etc...) to django backend. After building the vue files with css, I placed them in Nginx reverse proxy server. All of the axios calls have been rejected with 403 errors. If I typed the api address on browser address window, DRF is working fine.

Originally, I did not used corsheader library because django and vue are same origin, but I installed to allow everything. Nothing works. Please help me what could be a solution?

@thijskramer
Copy link
Collaborator

This sounds like a problem with Cross-Origin headers, not really with either Vite or Django-vite.

Could you provide a reproducible example?

@thijskramer thijskramer added the question Further information is requested label May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants