-
Notifications
You must be signed in to change notification settings - Fork 83
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
wildcard redirects not working from 'firebase serve' #231
Comments
Still an issue on |
Just ran some unit tests and it fails on redirects with segments in urls, here's the output:
|
Using Firebase Hosting and experiencing a related issue when attempting to use redirects with a combination of glob negation and segment capturing. "redirects": [{
"source" : "/one/!(a|b|c)/:end.html",
"destination" : "/one/d/:end.html",
"type" : 302
}] Does not redirect /one/z/test.html to /one/d/test.html as expected. |
2 years passed, version 6.9.2 still have this error
|
This seems to work with However, there seems to be a couple of limitations/deviations from the actual server (used for deployed apps):
It is not great that the behavior of the emulator/devserver deviates from that of the deployed app, but at least there are work-arounds available. |
This simplifies the Firebase redirect config, removing a redundant pattern (`/api/http`) which is covered by the previous pattern and dropping an unused named captured segment (`:rest*`). This change does not affect the redirection behavior for the deployed apps, but allows the Firebase hosting emulator to work correctly. (See [here][1] for more info.) NOTE: Although we are not currently using the Firebase emulator for development/testing, we might want to use it in the future. [1]: firebase/superstatic#231 (comment)
This simplifies the Firebase redirect config, removing a redundant pattern (`/api/http`) which is covered by the previous pattern and dropping an unused named captured segment (`:rest*`). This change does not affect the redirection behavior for the deployed apps, but allows the Firebase hosting emulator to work correctly. (See [here][1] for more info.) NOTE: Although we are not currently using the Firebase emulator for development/testing, we might want to use it in the future. [1]: firebase/superstatic#231 (comment)
This simplifies the Firebase redirect config, removing a redundant pattern (`/api/http`) which is covered by the previous pattern and dropping an unused named captured segment (`:rest*`). This change does not affect the redirection behavior for the deployed apps, but allows the Firebase hosting emulator to work correctly. (See [here][1] for more info.) NOTE: Although we are not currently using the Firebase emulator for development/testing, we might want to use it in the future. [1]: firebase/superstatic#231 (comment) PR Close #34726
This simplifies the Firebase redirect config, removing a redundant pattern (`/api/http`) which is covered by the previous pattern and dropping an unused named captured segment (`:rest*`). This change does not affect the redirection behavior for the deployed apps, but allows the Firebase hosting emulator to work correctly. (See [here][1] for more info.) NOTE: Although we are not currently using the Firebase emulator for development/testing, we might want to use it in the future. [1]: firebase/superstatic#231 (comment) PR Close #34726
Does this work? wildcards+redirects? |
currently working (8.1.1) with relative redirects but not absolute ones 😒 |
Not working here with everything up-to-date. I tried all that you can imagine to do this below: "redirects": [ { Can somebody help me? |
The official example itself is not working in emulator
|
Having the same issue, as far as I know query parameters are not supported for "source" in redirects, just wondering if that's the current Firebase standpoint. |
This post helped me this lately. |
To me this if it has worked for me {
"hosting": {
"cleanUrls": true,
"trailingSlash": false,
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"redirects": [
{
"source": "/index.html",
"destination": "/index",
"type": 301
},
{
"source": "/networks.html",
"destination": "/networks",
"type": 301
}
]
}
} |
A trivial configuration like
does not work in the emulator, but works in deployed version. Is it a known limitation? |
I'm trying to redirect some requests from
firebase serve
topub serve
(Dart's local server) on a local machine, but the wildcard redirects seem to be not working.I'm using the following
firebase.json
firebase-cli version: 3.7.0
superstatic version: 4.1.0
Windows 10 Pro x64
The text was updated successfully, but these errors were encountered: