mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(cloudcommon): splice notifyurl correctly
This commit is contained in:
@@ -19,7 +19,6 @@ import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
@@ -831,7 +830,7 @@ func (task *STask) GetTaskRequestHeader() http.Header {
|
||||
header := mcclient.GetTokenHeaders(userCred)
|
||||
header.Set(mcclient.TASK_ID, task.GetTaskId())
|
||||
if len(serviceUrl) > 0 {
|
||||
notifyUrl := filepath.Join(serviceUrl, "tasks", task.GetTaskId())
|
||||
notifyUrl := fmt.Sprintf("%s/tasks/%s", serviceUrl, task.GetTaskId())
|
||||
header.Set(mcclient.TASK_NOTIFY_URL, notifyUrl)
|
||||
}
|
||||
return header
|
||||
|
||||
Reference in New Issue
Block a user