Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持URL重定向,UUID URL重定向至slug等链接方案,使用old_slug等方式,支持slug更换重定向 #3087

Open
qixing-jk opened this issue Dec 28, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@qixing-jk
Copy link
Contributor

为什么提出这个新的特性改动
既然都用上了中间件了,Vercel可是额外计算用量的东西,虽然现在基本中间件纯滑水,鉴权相关的功能没有完善,那不如直接中间件实现站点链接的统一,便于更换链接或者链接格式

描述一下你推荐的解决方案
使用middleware中间件,配合Notion数据获取计算重定向配置

  • 默认使用sitemap等的build期间生成文件的方式生成重定向JSON文件,在middleware中进行读取处理

  • 或者使用Redis缓存?但感觉没必要,而且各个云平台和VPS之间架构和配置的统一也很麻烦)

描述一下你考虑过的其它替代解决方案
暂无

补充说明
虽然Vercel不支持运行期间写文件,但是可以读,文件形式利于实现兼容性,且一般情况下性能也够用
https://vercel.com/guides/loading-static-file-nextjs-api-route#step-3:-read-the-file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants