mirror of
https://git.robbyzambito.me/http-nats-proxy
synced 2025-12-21 00:34:50 +00:00
Disable NKEY connection for now
Not used and it wasn't working Added a connection name to make it easier to track the connection
This commit is contained in:
4
main.go
4
main.go
@@ -54,14 +54,14 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set up NATS connection options
|
// Set up NATS connection options
|
||||||
opts := []nats.Option{}
|
opts := []nats.Option{nats.Name("Web proxy")}
|
||||||
|
|
||||||
if natsUser != "" && natsPassword != "" {
|
if natsUser != "" && natsPassword != "" {
|
||||||
opts = append(opts, nats.UserInfo(natsUser, natsPassword))
|
opts = append(opts, nats.UserInfo(natsUser, natsPassword))
|
||||||
} else if natsToken != "" {
|
} else if natsToken != "" {
|
||||||
opts = append(opts, nats.Token(natsToken))
|
opts = append(opts, nats.Token(natsToken))
|
||||||
} else if natsNkey != "" && natsNkeySeed != "" {
|
} else if natsNkey != "" && natsNkeySeed != "" {
|
||||||
opts = append(opts, nats.Nkey(natsNkey, []byte(natsNkeySeed)))
|
log.Fatalln("NKEY connection not supported")
|
||||||
} else if natsCredsFile != "" {
|
} else if natsCredsFile != "" {
|
||||||
opts = append(opts, nats.UserCredentials(natsCredsFile))
|
opts = append(opts, nats.UserCredentials(natsCredsFile))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user