You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For my web app I use http-proxy-middleware as mentioned in the CRA docs in a setupProxy.js file to proxy API requests to a locally running API server like so:
However when running create-react-app it also offers that you can access your site on your local network via an IP address, for example to test the experience on a mobile device. This feature doesn't seem to be compatible with the proxying approach as I'm using above, which I think is because that localhost URL isn't being rewritten to the IP address either (and i'm not sure if a different port will be forwarded as well).
Is your proposal related to a problem?
For my web app I use
http-proxy-middleware
as mentioned in the CRA docs in asetupProxy.js
file to proxy API requests to a locally running API server like so:However when running
create-react-app
it also offers that you can access your site on your local network via an IP address, for example to test the experience on a mobile device. This feature doesn't seem to be compatible with the proxying approach as I'm using above, which I think is because thatlocalhost
URL isn't being rewritten to the IP address either (and i'm not sure if a different port will be forwarded as well).Spectrum thread for my use case here.
Describe the solution you'd like
If this is possible I would love for the proxying docs to explain how to make these two features work together in harmony.
Describe alternatives you've considered
I tried messing around with settings passed to
http-proxy-middleware
, but I'm having trouble coming up with something that works.Additional context
Thanks for the great project and hope this helps in making it even greater!
The text was updated successfully, but these errors were encountered: