-29

next/image 无法携带 Referer 导致没法过腾讯 COS 的防盗链怎么办

 1 year ago
source link: https://www.v2ex.com/t/865563
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  Next.js

next/image 无法携带 Referer 导致没法过腾讯 COS 的防盗链怎么办

  Foryou920 · 2 小时 33 分钟前 · 229 次点击
昨天晚上花了点时间把项目里边的 img 标签全部换成 next/image ,满心欢喜的 build 然后 start ,结果控制台报一堆访问图片的 403 错误,前端的图片也没法显示出来,Devtools 看后端返回提示 "url" parameter is valid but upstream response is invalid

在 next 的 issues 上找到类似的问题: https://github.com/vercel/next.js/issues/

问问各位大佬 这种情况该怎么办,直接关掉防盗链吗?

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK