admin管理员组文章数量:1277317
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'.
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:
Share Improve this question edited Jul 12, 2022 at 6:59 vimuth 5,67248 gold badges93 silver badges124 bronze badges asked Jul 12, 2022 at 6:58 Kevin TanuwijayaKevin Tanuwijaya 1211 gold badge1 silver badge6 bronze badgesError with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
2 Answers
Reset to default 3The 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>
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>;
本文标签:
版权声明:本文标题:javascript - Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort' 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741271089a2369312.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论