-
Notifications
You must be signed in to change notification settings - Fork 1k
Dynamic content functions redirect in emulators to :5001 port instead of :5000 #3097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Could you provide the steps to reproduce this? When I try to reproduce, it works as expected (I'm being redirected to |
@kmcnellis will try my best! This is my firebase.json:As you can see, I'm matching /user/ path to the express function.
This is the express function that gets called.It's in the index.ts file in my functions. You can see that I redirect to either / (if no matching doc found) or /${username} if a matching doc is found.
Steps to reproduce:
or
Either option results in obviously the wrong path and a 'Not Found' message is displayed. |
Ah, interesting. This is a regression that started after v8.16.2 |
@bkendall Looks like you did a big change in the hosting emulator in v8.17. Could you take a look at this? |
Alright, I'm digging into this, and I'm just mad at code now. The function itself is doing the right thing:
And then I try to make the request through the Hosting emulator:
Wut? WHY IS THAT LOCATION HEADER CHANGED? WHAT IS HAPPENING? WHO DONE THIS? ... ... ... I'm working on it. |
This should go out in the next release (when is to be seen). Thanks |
[REQUIRED] Environment info
firebase-tools: 9.1.0
Platform: macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
See above
[REQUIRED] Expected behavior
Expect the redirect to use the :5000 port to navigate the user to: localhost:5000/destination
NOTE - when deployed to live, this redirect works fine. Only when operating in the emulator do the ports seem to get muddled up.
[REQUIRED] Actual behavior
Redirects to localhost:5001/destination.
I understand this is because the functions emulator is running at :5001, however production redirects to the hosting path without any issues.
Is there either a fix to be done to the emulator, or a way I can tell express to use :5000 port instead of :5001 ?
The text was updated successfully, but these errors were encountered: