Firebase Hosting causes navigation to break upon reload

Troubleshooting

Good day

When deploying this FlutterFlow project as a web app to Firebase Hosting, as described in https://blog.flutterflow.io/deploying-flutterflow-web-app-to-firebase-hosting/, the URL seems to update according to the user navigating across the page. However, when reloading the page with anything but the root URL, Firebase Hosting is unable to GET /subdomain

How do I set up URL navigation?
I would also be satisfied with redirecting to the root URL when hitting anything but the root URL r

What have you tried so far?

Adding the "redirects" section accordingly in firebase.json is only possible on the local emulator and does not work when actually deploying (every page is just blank)

Current firebase.json:

{
  "hosting": {
    "source": ".",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "frameworksBackend": {
      "region": "us-central1"
    }
  }
}

I did not add redirects in firebase.json when deploying since it doesn't work as described above. But here is what I tried to do:

"redirects": [
      {
        "regex": "^\/.+$",
        "destination": "/"
      }
]

Did you check FlutterFlow's Documentation for this topic?
Yes
2
1 reply