Vite dev server behind a reverse proxy #43262
Unanswered
gsguglielmo
asked this question in
Ideas
Replies: 1 comment
-
Hey @gsguglielmo do you have any workaround for this? I cannot figure out how to get this working... |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've an issue when running a Vite dev server behind a reverse proxy.

If the dev server is running (the
public/hot
file is present), the@vite
directive, will automatically get the base url for the tag from thehot
file, which is fine, if you don't have a reverse proxy in front of the dev server. In my case thehot
file will always have an IPv4/IPv6 address, even if you change the settings of the vite.config.js with a hostname, it will resolve the hostname.It would be nice to have a config to manually set the base url, just like Mix. Mix has a config
app.mix_hot_proxy_url
which will use the specified url if present and continue with the default behavior if not.framework/src/Illuminate/Foundation/Mix.php
Lines 35 to 39 in b15dc2a
I'm willing to make a pull request if you think that this would be a good feature to have 🙂
Beta Was this translation helpful? Give feedback.
All reactions