spinnaker cors 门问题 api

spinnaker cors issue with gate api

我在私有 IP 上访问 spinnaker 时出现以下错误。

Failed to load http://privateip:8084/webhooks/preconfigured: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://privateip:9000' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

我使用下面的 hal config 命令添加了基础 url。

hal config security ui edit --override-base-url "privateip"
hal config security api edit --override-base-url "privateip"

有谁知道如何解决上述错误

--override-base-url 主要用于分配 DNS 地址。使用原始 IP 时不需要它来指定该参数。

您可以尝试这样的操作:
hal config security api edit --cors-access-pattern privateip
不需要双引号。 在这里查看文档:https://www.spinnaker.io/reference/halyard/commands/#hal-config-security-api-edit