DEV: Fix ember-cli proxy assets (#22674)
We were proxying all `/assets/*` requests through to the origin. In local development that was fine, because Rails was able to serve files from the `dist/` directory. But when proxying to a remote origin, we want the local ember-cli to serve its own JS assets
This commit is contained in:
parent
a418dce1aa
commit
2c4faf48f9
|
@ -516,6 +516,15 @@ to serve API requests. For example:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// All JS assets are served by Ember CLI, except for
|
||||||
|
// plugin assets which end in _extra.js
|
||||||
|
if (
|
||||||
|
request.path.startsWith(`${baseURL}assets/`) &&
|
||||||
|
!request.path.endsWith("_extra.js")
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (request.path.startsWith(`${baseURL}_lr/`)) {
|
if (request.path.startsWith(`${baseURL}_lr/`)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue