-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Proxy does not work, both requests to backend and http://localhost:3000/ #3475
Comments
I'm facing the same issue. Too bad there hasn't been an appropriate answer to solve posted yet. In my case, I'm facing this issue on Windows and Linux (Ubuntu). |
Maybe there was a misunderstanding, vite's proxy means it will route requests from a browser to the target server.
|
And my requests are never proxied from |
I am facing a similar issue System Info This is actually blocking my whole migration :-( |
@Codermar You can specifiy |
Half a year later and the still same issue occurs. Any idea when this will be fixed? |
Contributions welcome |
|
This worked for me. |
This is working for me, it will proxy: |
It's difficult to solve without reproducing it and there was many updates so it might be already solved. |
Describe the bug
#1014 (comment)
Same like this issue.
my
vite.config.ts
and the
React code
Reproduction
Create a blank project with vite,
yarn create @vitejs/app
Add
vite.config.ts
with proxies from the docIssue request to
/api
or anything using fetchObserve that requests are still sent to the dev server
http://localhost:8000/
andhttp://localhost:3000/
in my case.System Info
vite: ^2.3.0 => 2.3.2
OS: Linux 4.19 Ubuntu 20.04.2 LTS (Focal Fossa)
node: v16.0.0
yarn -v: 1.22.10
Logs
The text was updated successfully, but these errors were encountered: