-
Notifications
You must be signed in to change notification settings - Fork 811
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
Fix CORS compatibility with OpenAI, vLLM, TGI, LMDeploy #1373
Conversation
Hi @josephrocca Long time no see! Didn't expect to find you here in SGLang again. Glad to see you using SGLang. Feel free to join our Slack channel at https://sgl-fru7574.slack.com/join/shared_invite/zt-2ngly9muu-t37XiH87qvD~6rVBTkTEHw |
@josephrocca Please follow https://github.com/sgl-project/sglang/blob/main/docs/en/contributor_guide.md to resolve the lint issue. Thanks! |
Hi @josephrocca I have directly resolved some format issues based on your work, and it has been merged. Thank you very much for your contribution! |
Thanks! |
Motivation
Fixes #333
Fix CORS compatibility with OpenAI API, vLLM, TGI, LMDeploy, TabbyAPI, and others. Currently SGLang is the only one which does not use wildcard CORS headers. This makes it annoying to make requests directly from a web page to a SGLang server, since it requires adding an extra proxy server in between to add the CORS headers.
My particular use case is an in-browser eval framework. An intermediary server is not needed for this use case, except to solve this CORS issue.
Examples:
Modifications
Add CORS middleware.