Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'
Asked Answered
P

2

9

Im trying to host my project on github pages, project is working good in localhost but on gh pages I got blank page and an error like this on console:

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.

Pagurian answered 12/7, 2022 at 6:58 Comment(0)
P
3

The problem is not the error message, it's because i'm using react router, so i need to define the routes according to github repo name

Before:

<Router>
  <Routes>
    <Route path="/" element={<Home />} />
  </Routes>
</Router>

After:

<Router>
  <Routes>
    <Route path="/desa" element={<Home />} />
  </Routes>
</Router>
Pagurian answered 13/7, 2022 at 7:14 Comment(0)
D
1

I solved this is issue use the "exact" in routes

return <BrowserRouter>
<div className="App">
<Routes>
    <Route exact path="/" element={ <Home /> } />
    <Route exact path="startcreating" element={ <Start /> } />
    <Route exact path="aboutus" element={ <About /> } />
    {/* <Route path="signup" element={ <SignUpModel /> } /> */}
</Routes> 
</div>
</BrowserRouter>;
Duet answered 27/2, 2023 at 13:50 Comment(1)
For anyone else that is looking I ran into a problem using basename within my <HashRouter>, apparently they don't work well togetherDang

© 2022 - 2024 — McMap. All rights reserved.