Merge branch 'main' into fix/cli-local-mode-endpoints

# Conflicts:
#	internal/backend/server/middleware.go
This commit is contained in:
leookun
2026-08-03 00:39:56 +08:00
41 changed files with 2325 additions and 725 deletions
+1 -2
View File
@@ -15,7 +15,6 @@ import (
"time"
"cursor/gen/aiserverv1"
"cursor/internal/backend/server"
"cursor/internal/logger"
"cursor/internal/netproxy"
legacyruntime "cursor/internal/runtime"
@@ -87,7 +86,7 @@ func buildUpstreamRequest(reqCtx *RequestContext, body []byte, options ForwardOp
}
upstreamRequest.Host = reqCtx.TargetURL.Host
if reqCtx.Mode == server.ModeLocal && shouldRewriteHost(reqCtx.TargetURL.Hostname()) {
if shouldRewriteHost(reqCtx.TargetURL.Hostname()) {
auth := formatBearerAuthorization(legacyruntime.LocalRelayToken)
if auth == "" {
return nil, nil, legacyruntime.ErrInvalidSystemSetting