server: Parse port numbers from MCP server URLs in CORS proxy (#20208)

* Parse port numbers from MCP server URLs

* Pass scheme to http proxy for determining whether to use SSL

* Fix download on non-standard port and re-add port to logging

* add test

---------

Co-authored-by: Xuan Son Nguyen <son@huggingface.co>
This commit is contained in:
Evan Huus
2026-03-09 12:47:54 -04:00
committed by GitHub
parent e22cd0aa15
commit 23fbfcb1ad
6 changed files with 67 additions and 4 deletions
+1
View File
@@ -180,6 +180,7 @@ struct server_http_proxy : server_http_res {
std::function<void()> cleanup = nullptr;
public:
server_http_proxy(const std::string & method,
const std::string & scheme,
const std::string & host,
int port,
const std::string & path,