[Bug] 启用 pglite 后 vercel 部署的服务如果使用自定义域名会有跨域问题 #6362
-
📦 部署环境Vercel 📦 部署模式客户端 Pglite 模式(lobe-chat-pglite 镜像) 📌 软件版本dev 💻 系统环境Other Linux, macOS 🌐 浏览器Edge 🐛 问题描述启用 pglite 后 vercel 部署的服务如果使用自定义域名会有跨域问题导致无法正常初始化 pglite 数据库 ![]()
浏览器控制台可以看到有关跨域的报错: ![]() 📷 复现步骤No response 🚦 期望结果No response 📝 补充信息能够直接把这个资源静态托管? |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
Hey @AndSonder! I'm here to help you with bug fixes, answer questions, and even become a contributor. Let's squash those bugs together! 🤖 The issue you're encountering is related to CORS (Cross-Origin Resource Sharing) when using a custom domain with Vercel for the Pglite database. The error message indicates that the request to fetch the Pglite database bundle is being blocked because the server does not include the To resolve this issue, you can try the following steps:
These steps should help you address the CORS issue and allow the Pglite database to initialize correctly on your custom domain. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
top 顶级域名被 npmmirror CDN 拉黑了,临时处理方法是修改下面的资源地址,找一个其他 CDN 的资源吧。 lobe-chat/src/database/client/db.ts Lines 27 to 35 in ef02986 |
Beta Was this translation helpful? Give feedback.
-
The top top-level domain name has been blocked by npmmirror CDN. The temporary solution is to modify the resource address below and find a resource for other CDNs. lobe-chat/src/database/client/db.ts Lines 27 to 35 in ef02986 |
Beta Was this translation helpful? Give feedback.
-
这个资源就是静态托管享受全球 CDN 加速的。只是 |
Beta Was this translation helpful? Give feedback.
-
This resource is static hosting to enjoy global CDN acceleration. It's just that too many black products of domain names have been blocked |
Beta Was this translation helpful? Give feedback.
-
好的了解了,我再试试看其他的 cdn,感谢各位大佬的解惑 |
Beta Was this translation helpful? Give feedback.
-
This issue is closed, If you have any questions, you can comment and reply. |
Beta Was this translation helpful? Give feedback.
-
I have a good understanding, I will try other cdns again. Thank you for your answers |
Beta Was this translation helpful? Give feedback.
这个资源就是静态托管享受全球 CDN 加速的。只是
.top
域名黑产过多被拉黑了