model_server icon indicating copy to clipboard operation
model_server copied to clipboard

add CORS headers to responses

Open Huanli-Gong opened this issue 6 months ago • 2 comments

Details:

  • add CORS headers to handle cross-origin request.

Tickets:

Huanli-Gong avatar Jun 17 '25 04:06 Huanli-Gong

This is good approach to enable the connection over CORS. For merging, we would need to make those parameters allow_origins=[""], # list of strings allow_credentials=True, # bool allow_methods=[""], # list of strings allow_headers=["*"], # list of strings configurable from the CLI

dtrawins avatar Jun 18 '25 13:06 dtrawins

This is good approach to enable the connection over CORS. For merging, we would need to make those parameters allow_origins=[""], # list of strings allow_credentials=True, # bool allow_methods=[""], # list of strings allow_headers=["*"], # list of strings configurable from the CLI

It's complicated, I'll make them configurable from the CLI in another merge request later.

Huanli-Gong avatar Jun 18 '25 18:06 Huanli-Gong

ok, we can do it in steps

dtrawins avatar Jun 26 '25 13:06 dtrawins