[Bug] 部署在vercel上,请求本地ollama报错“Direct IP access is not allowed in Vercel's Edge environment” #5545
-
📦 部署环境Vercel 📌 软件版本1.47.10 💻 系统环境Windows 🌐 浏览器Edge 🐛 问题描述将网站部署在vercel上后,请求本地的ollama会报错“Direct IP access is not allowed in Vercel's Edge environment”,但是命令行提问ollama是正常的,而且之前没有这个问题,跨域也已经启用,请问应该如何解决这个问题,是vercel的问题吗
📷 复现步骤启动ollama,并访问在vercel上部署的lobechat网站(例如 https://chat-preview.lobehub.com/ ),发送任意提示词,则提示错误,如下图 🚦 期望结果希望能像之前一样正常使用Ollama,不再受到vercel策略的影响 📝 补充信息No response |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
📦 Deployment environmentVercel 📌 Software version1.47.10 💻 System environmentWindows 🌐 BrowserEdge 🐛 Problem descriptionAfter deploying the website on Vercel, when requesting local ollama, an error message "Direct IP access is not allowed in Vercel's Edge environment" will be reported. However, it is normal to ask ollama from the command line. This problem has not occurred before, and cross-domain has been enabled. What should I do? How to solve this problem? Is it a problem with vercel?
|
Beta Was this translation helpful? Give feedback.
-
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.
-
The error you're encountering, "Direct IP access is not allowed in Vercel's Edge environment," indicates that Vercel's Edge environment does not permit direct IP access, such as accessing To resolve this issue, you can consider the following approaches:
These steps should help you bypass the restriction imposed by Vercel's Edge environment and allow your Lobe Chat application to communicate with the Ollama service. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
因为你关掉了客户端请求吧? 打开客户端请求应该就好了? |
Beta Was this translation helpful? Give feedback.
-
Is it because you turned off client requests? It should be fine to open client requests? |
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.
因为你关掉了客户端请求吧? 打开客户端请求应该就好了?