1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-09-25 17:51:11 +02:00

<fix> Convert the derpmap parsing from yaml to json to ensure compatibility with the tags defined at the time of the DERPMap structure

This commit is contained in:
liuxocakn 2025-08-31 17:59:22 +08:00
parent 8e25f7f9dd
commit c86e046a3b

View File

@ -17,7 +17,6 @@ import (
"github.com/juanfont/headscale/hscontrol/types"
"github.com/spf13/viper"
"gopkg.in/yaml.v3"
"tailscale.com/tailcfg"
)
@ -32,7 +31,7 @@ func loadDERPMapFromPath(path string) (*tailcfg.DERPMap, error) {
if err != nil {
return nil, err
}
err = yaml.Unmarshal(b, &derpMap)
err = json.Unmarshal(b, &derpMap)
return &derpMap, err
}