chore: switch to x-headplane-tailnet-id
This commit is contained in:
parent
951a96fad6
commit
b8fb1fa40f
@ -2,11 +2,12 @@ package hpagent
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gorilla/websocket"
|
|
||||||
"github.com/tale/headplane/agent/tsnet"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
|
"github.com/gorilla/websocket"
|
||||||
|
"github.com/tale/headplane/agent/tsnet"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Socket struct {
|
type Socket struct {
|
||||||
@ -23,7 +24,7 @@ func NewSocket(agent *tsnet.TSAgent, controlURL, authKey string, debug bool) (*S
|
|||||||
}
|
}
|
||||||
|
|
||||||
headers := http.Header{}
|
headers := http.Header{}
|
||||||
headers.Add("X-Headplane-TS-Node-ID", agent.ID)
|
headers.Add("X-Headplane-Tailnet-ID", agent.ID)
|
||||||
|
|
||||||
auth := fmt.Sprintf("Bearer %s", authKey)
|
auth := fmt.Sprintf("Bearer %s", authKey)
|
||||||
headers.Add("Authorization", auth)
|
headers.Add("Authorization", auth)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user