Weird behavior proxy with django rest framework #6593
Unanswered
bryangeplant
asked this question in
Q&A
Replies: 2 comments
-
Hey, its probably been a while, but do you remember how or if you fixed this? cheers! |
Beta Was this translation helpful? Give feedback.
0 replies
-
🤦 don't make proxy for root '/' it won't work. your vue frontend is on it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, you know when you access a view with django rest api, you get an html page, and when you send something like an ajax request, you get the json? I'm trying to figure out how to mess with proxy, but I can't find a single decent documentation around it. I want to redirect '/' to 'http://localhost:8000/api', but there's really weird behavior going on. If I do this:
and make requests using '/api', it works as expected. However, if I do
It just spews out the html version of the api view, but with no styling, with a bunch of errors
No idea what to do. If someone could explain how this proxy works, i'd really love it.
Beta Was this translation helpful? Give feedback.
All reactions