踩坑: VuePress 与 Cloudflare Pages 的奇妙冲突,无法使用 giscus

查看 23|回复 1
作者:OneEarMouse   
搞了一下午总算搞明白为什么了
原文连接: https://www.oneearmouse.com/posts/VuePress-cloudflarepage-conflict.html
太长不看总结:
[ol]
  • VuePress 默认路由系统后缀为.html
  • Cloudflare Pages 默认重定向.html 后缀
    [/ol]
    因此会发生
  • 假设正在访问https://www.oneearmouse.com/posts/VuePress-Migrate.html
  • 点击登陆 giscus
  • 登陆完成后,跳转到 https://www.oneearmouse.com/posts/VuePress-Migrate.html?giscus=xxx
  • Cloudflare 不支持.html ,308 重定向,到 https://www.oneearmouse.com/posts/VuePress-Migrate?giscus=xxx
  • VuePress 路由重定向,到https://www.oneearmouse.com/posts/VuePress-Migrate
  • 最终,giscus=xxx 的参数在多次跳转后被抛弃了,因此无法登陆

    太蠢了,准备把 vuepress 换了或者换回 github page 了
  • Epiloguess   
    cloudflare 可以设置转发规则的,或许可以帮到你
    您需要登录后才可以回帖 登录 | 立即注册

    返回顶部