你上面的第一个图,访问的时候是host
host集群吗?
这个看起来是个缺陷,没有考虑到多集群的情况。我找到了对应的代码:
` get webhookUrl() {
const { formTemplate } = this.props
const url = get(formTemplate, `${this.scmPrefix}.url`, '')
const api_uri = get(formTemplate, `${this.scmPrefix}.api_uri`, '')
const owner = get(formTemplate, `${this.scmPrefix}.owner`, '')
const repo = get(formTemplate, `${this.scmPrefix}.repo`, '')
const bitbucket_url = `${api_uri}/scm/${owner}/${repo}.git`
switch (this.sourceType) {
case 'bitbucket_server':
return `${window.location.protocol}//${window.location.host}/devops_webhook/git/?url=${bitbucket_url}`
case 'github':
return `${window.location.protocol}//${window.location.host}/devops_webhook/${this.sourceType}/`
default:
return `${window.location.protocol}//${window.location.host}/devops_webhook/git/?url=${url}`
}
}
https://github.com/kubesphere/console/blob/a19ecdfe08ed4cf40d8869df1702590b525c4ec9/src/components/Forms/Pipelines/AdvanceSettings/index.jsx#L84