-
-
Notifications
You must be signed in to change notification settings - Fork 12k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
[Bug] 启用 pglite 后 vercel 部署的服务如果使用自定义域名会有跨域问题 #6329
Comments
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
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 |
top 顶级域名被 npmmirror CDN 拉黑了,临时处理方法是修改下面的资源地址,找一个其他 CDN 的资源吧。 lobe-chat/src/database/client/db.ts Lines 27 to 35 in ef02986
|
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
|
这个资源就是静态托管享受全球 CDN 加速的。只是 |
This resource is static hosting to enjoy global CDN acceleration. It's just that too many black products of domain names have been blocked |
好的了解了,我再试试看其他的 cdn,感谢各位大佬的解惑 |
This issue is closed, If you have any questions, you can comment and reply. |
I have a good understanding, I will try other cdns again. Thank you for your answers |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
📦 部署环境
Vercel
📦 部署模式
客户端 Pglite 模式(lobe-chat-pglite 镜像)
📌 软件版本
dev
💻 系统环境
Other Linux, macOS
🌐 浏览器
Edge
🐛 问题描述
启用 pglite 后 vercel 部署的服务如果使用自定义域名会有跨域问题导致无法正常初始化 pglite 数据库
浏览器控制台可以看到有关跨域的报错:
📷 复现步骤
No response
🚦 期望结果
No response
📝 补充信息
能够直接把这个资源静态托管?
https://registry.npmmirror.com/@electric-sql/pglite/0.2.13/files/dist/postgres.data
The text was updated successfully, but these errors were encountered: