mirage enabled even when using `--proxy` flag
Closed this issue · 5 comments
It looks like this PR #2495 released 2 weeks ago under 3.0.0-alpha.4 has removed the config/environment.js
file
That config/environment.js
file had a usingProxy()
function that would set ENV['ember-cli-mirage'].usingProxy
to true if proxy flag was set
https://github.com/miragejs/ember-cli-mirage/pull/2495/files#diff-77d6e2aab53cbf594475ecab6eac3882cd95a1c3d95085833caa58c39cb0a910L4-L11
When usingProxy
is true, that would disable mirage server in the initializer
Right now nothing sets that usingProxy
property in the config, so mirage ends up being enabled even when proxies are set
This seems like an unintentional change (wasn't mentioned in 3.0.0 Breaking Changes)
cc @deepfryed
@Techn1x sorry for churn, fix published in v3.0.1
Thanks so much! You do great work! I am just glad to see things moving in mirage land :)
@Techn1x @SergeAstapov I appreciate the report and the quick response, as my team encountered a related issue on 3.0.0
. Updating ember-cli-mirage
to 3.0.1
fixed our problem, and the update from 2.4.0
to 3.0.0
went otherwise smoothly. ✨
Even after updating to 3.0.1
, one of our developers found that the issue exists on their Windows machine. By temporarily updating the Mirage config to passthrough all requests, the requests to the desired server worked:
function routes() {
this.passthrough();
// removed all other overrides
}
We're not sure yet if the Windows issue is an existing one, either in ember-cli-mirage
or miragejs
. If we can come up with a minimal reproducible app (I imagine this will take time, as we would need to create an Ember app as well as a Rails/Node server), we'll let you know.
(Could be hard-coded /
in paths like https://github.com/miragejs/ember-cli-mirage/pull/2559/files#diff-77d6e2aab53cbf594475ecab6eac3882cd95a1c3d95085833caa58c39cb0a910R14.)
@ijlee2 thank you for the pull request! This is released as v3.0.2