From 7d3d0edda924d99702d0974577f0e9709474104d Mon Sep 17 00:00:00 2001 From: Jian Qiu Date: Thu, 3 Sep 2026 00:50:14 +0800 Subject: [PATCH] fix: apigateway returns cors_hosts to browser (#25493) Co-authored-by: Qiu Jian --- pkg/apigateway/handler/auth.go | 1 + pkg/apis/apigateway/regions.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkg/apigateway/handler/auth.go b/pkg/apigateway/handler/auth.go index 39f9348fff..9ebcd9be0c 100644 --- a/pkg/apigateway/handler/auth.go +++ b/pkg/apigateway/handler/auth.go @@ -155,6 +155,7 @@ func (h *AuthHandlers) GetRegionsResponse(ctx context.Context, w http.ResponseWr Idps: []agapi.SIdp{}, EncryptPasswd: true, ApiServer: options.Options.ApiServer, + CorsHosts: options.Options.CorsHosts, } s := auth.GetAdminSession(ctx, regions[0]) diff --git a/pkg/apis/apigateway/regions.go b/pkg/apis/apigateway/regions.go index e24619526b..71add875ae 100644 --- a/pkg/apis/apigateway/regions.go +++ b/pkg/apis/apigateway/regions.go @@ -33,4 +33,6 @@ type SRegionsReponse struct { EncryptPasswd bool `json:"encrypt_passwd"` ApiServer string `json:"api_server,allowempty"` + + CorsHosts []string `json:"cors_hosts,allowempty"` }