-
Notifications
You must be signed in to change notification settings - Fork 30.6k
Unable to change URL(host) for web-server hot-reload #179406
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: buildBuilding flutter applications with the toolBuilding flutter applications with the toolfound in release: 3.38Found to occur in 3.38Found to occur in 3.38found in release: 3.39Found to occur in 3.39Found to occur in 3.39fyi-toolFor the attention of Flutter Tool teamFor the attention of Flutter Tool teamhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyt: hot reloadReloading code during "flutter run"Reloading code during "flutter run"team-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: buildBuilding flutter applications with the toolBuilding flutter applications with the toolfound in release: 3.38Found to occur in 3.38Found to occur in 3.38found in release: 3.39Found to occur in 3.39Found to occur in 3.39fyi-toolFor the attention of Flutter Tool teamFor the attention of Flutter Tool teamhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyt: hot reloadReloading code during "flutter run"Reloading code during "flutter run"team-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Steps to reproduce
I am running flutter web server using
flutter run -d web-servercommand. Hot-reload on it works just fine when I access it fromlocalhost. But when I expose it from a Nginx proxy config, it fails to hot-reload and it tries to make a request to following address which gets blocked.When running behind the proxy URL, (Assume
https://example.com) it should use the proxy's URL (e.g.https://example.com/reloaded_sources.json) and should support hot-reloading.I couldn't find any flag on
flutter runcommand that can make this work.Expected results
Instead of fetching
http://localhost:3002/reloaded_sources.json, it should make a request tohttps://example.com/reloaded_sources.json.Actual results
Hot-reload on web doesn't work when behind Nginx proxy and it makes a request to localhost:
http://localhost:3002/reloaded_sources.json.Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output