mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 13:14:24 +08:00
set server traffic pub key in pull resp
This commit is contained in:
parent
be73a92ebb
commit
d12e4ecabf
1 changed files with 7 additions and 0 deletions
|
@ -94,6 +94,13 @@ func pull(w http.ResponseWriter, r *http.Request) {
|
|||
if servercfg.GetBrokerType() == servercfg.EmqxBrokerType {
|
||||
serverConf.MQUserName = hostID
|
||||
}
|
||||
key, keyErr := logic.RetrievePublicTrafficKey()
|
||||
if keyErr != nil {
|
||||
logger.Log(0, "error retrieving key:", keyErr.Error())
|
||||
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
|
||||
return
|
||||
}
|
||||
serverConf.TrafficKey = key
|
||||
response := models.HostPull{
|
||||
Host: *host,
|
||||
ServerConfig: serverConf,
|
||||
|
|
Loading…
Add table
Reference in a new issue