v6.0.1: Fix URL the browser opens when the Dev Server is being proxied #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This issue was caused by #35. When I implemented the custom plugin for handling logging and opening the browser, I completely ignored the
proxied
setting, so if the dev server was being proxied, the browser was still opening the base URL.This hotfix fixes the issue: It adds a new
url
setting to theproxied
object_normalizeTargetDevServerSettings
returns. This URL can change depending on 2 things:proxied.enabled
istrue
but nohost
is specified, theurl
will copy the one built for the dev server as if is not being proxied.proxied.enabled
istrue
an ahost
was specified, theurl
will be built using thathost
.How should it be tested manually?
You can test it with a configuration like this one:
When you run your target for development, instead of opening
http://localhost:2525
, it should openhttps://my-local-domain.com
(Up to you to setupmy-local-domain
on your computer with SSL enabled :P).And of course...