2

I can redirect to the path in same domain but enable to redirect if domain is different. This error only occurs on firebase hosting and is working fine on localhost with yarn dev.

code:

const router = useRouter();
router.push("https://www.example.com/auth") //doesnot work
router.push("/dashboard"); //works

firebase.json

{
  "hosting": {
    "public": "out",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [ {
      "source": "/",
      "destination": "/index.html"
    },
{
    "source": "/dashboard",
    "destination": "/dashboard.html"
  }
   ]
  }
}

I am looking into firebase json file as I believe problem is there.

Jonas
  • 121,568
  • 97
  • 310
  • 388

0 Answers0