| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request adds support for routing Cloud Run rewrites to the local functions emulator when 'functions' is specified in the targets and the emulator is running. The review feedback suggests optimizing the implementation by replacing lodash dependencies (includes and cloneDeep) with native TypeScript features, such as optional chaining with Array.prototype.includes and standard object spreading, which allows for the removal of the external lodash imports.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
NIT: I think it would be a good idea to update the CHANGELOG.md for this PR as well.
Sorry, something went wrong.
…10588) * fix(hosting): route "run" rewrites to local functions emulator * updates * chore: update CHANGELOG
…irebase#10588) * fix(hosting): route "run" rewrites to local functions emulator * updates * chore: update CHANGELOG
| Back | FazBrowse Home | New Git URL |
When using Firebase Hosting rewrites with "run" format (required for Dart/Cloud Run functions),
the hosting emulator always hit the live Cloud Run API to resolve the service URL — even when the
functions emulator was running locally. This caused an error like:
Fix
Add emulator detection to cloudRunProxy.ts, mirroring the existing logic in functionsProxy.ts.
When targets includes "functions" and the functions emulator is running, route directly to the
local emulator URL instead of calling the Cloud Run API.
Related firebase/firebase-functions-dart#200