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

为什么无法加载 CDN 加速后的图片? #1620

Open
Kherrisan opened this issue Mar 23, 2024 · 0 comments
Open

为什么无法加载 CDN 加速后的图片? #1620

Kherrisan opened this issue Mar 23, 2024 · 0 comments

Comments

@Kherrisan
Copy link

我将博客里用到的图片存储到了腾讯云 OSS 里面,外面套了一层 CDN。在博客 markdown 中,当引用 OSS 中的文件链接时,图片加载没有问题,当引用 CDN 的链接时,提示 500 (Internal Server Error)。
我了解到 xLog 加载图片会通过 NextJS 的 后端(_next/image)进行一些处理,也就是说 500 实际上是 _next/image 报的错误。可能是我在腾讯云 CDN 的配置项出现了问题,例如国际加速,但是我不知道问题具体出现在什么地方。

例如, 图片的 OSS 原始链接为 https://kendrickzou-picgo-1253218764.cos.ap-shanghai.myqcloud.com/images/202403052134017.png,
经过 NextJS 代理之后的链接为:OSS 链接CDN 链接

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

No branches or pull requests

1 participant