DOMException:无法在“历史”React NextJS 上执行“replaceState”

时间:2021-01-04 20:18:56

标签: reactjs routes react-router next.js

在我的网站中打开谷歌缓存会抛出这个异常:

<块引用>

DOMException:无法在“历史”上执行“replaceState”:历史 带有 URL 的状态对象 'https://example.com/search?q=cache:rk9HFUZWPrwJ:https://example.com/istanbul-kadikoy+&cd=2&hl=tr&ct=clnk&gl=tr' 不能在带有原点的文档中创建 'https://webcache.googleusercontent.com' 和 URL 'https://webcache.googleusercontent.com/search?q=cache:rk9HFUZWPrwJ:https://example.com/istanbul-kadikoy+&cd=2&hl=tr&ct=clnk&gl=tr'

什么是问题,是 CORS 还是路由?

我的路由代码:

Router.pushRoute(props.routeName, { ...Router.query, pn: page })

0 个答案:

没有答案
相关问题