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

增加跨域的配置 #2735

Open
1 of 3 tasks
closer-finger opened this issue Jan 4, 2025 · 1 comment
Open
1 of 3 tasks

增加跨域的配置 #2735

closer-finger opened this issue Jan 4, 2025 · 1 comment
Milestone

Comments

@closer-finger
Copy link

System Info / 系統信息

xinference

Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?

  • docker / docker
  • pip install / 通过 pip install 安装
  • installation from source / 从源码安装

Version info / 版本信息

1

The command used to start Xinference / 用以启动 xinference 的命令

1

Reproduction / 复现过程

1

Expected behavior / 期待表现

增加跨域的配置如ollama的export OLLAMA_ORIGINS="*"一样

@XprobeBot XprobeBot added this to the v1.x milestone Jan 4, 2025
@qinxuye
Copy link
Contributor

qinxuye commented Jan 6, 2025

def serve(self, logging_conf: Optional[dict] = None):
self._app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)

目前配置的是 *。如果要增加通过环境变量控制,可以修改对应代码提交一个 PR,相信别人也能用得到。

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

3 participants