Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/inference/scheduling/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ func run(
r.URL.Path = trimRequestPathToOpenAIRoot(r.URL.Path)
r.URL.RawPath = trimRequestPathToOpenAIRoot(r.URL.RawPath)
}
proxy.ModifyResponse = func(resp *http.Response) error {
// CORS headers are set by the CorsMiddleware from pkg/inference/cors.go,
// so we remove them here to avoid duplication and potential misconfiguration.
resp.Header.Del("Access-Control-Allow-Origin")
return nil
}
proxy.Transport = transport
proxyLog := log.Writer()
proxy.ErrorLog = logpkg.New(proxyLog, "", 0)
Expand Down