'Firebase hosting redirect inserting trailing slash despite `trailingSlash` being false

The URL

https://example.com/Ryan

is redirecting to

https://example.com/index.html/?u=Ryan
                              ^
      unexpected trailing slash

firebase.json:

{
  "functions": {
    "source": "functions"
  },
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "redirects": [
      {
        "regex": "/(\\w+)",
        "destination": "/index.html?u=:1",
        "type": 301
      }
    ],
    "trailingSlash": false
  }
}

Given my current firebase.json rules above, how do I remove the unexpected trailing slash?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source