Skip to content

Commit 533df13

Browse files
committed
change: addr env
1 parent 19c340d commit 533df13

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cmd/server/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ func main() {
6969
log.Printf("Security Warning: ACCESS_TOKEN has not been set!\n")
7070
}
7171
addr := "localhost:8080"
72-
if port := os.Getenv("PORT"); port != "" {
73-
addr = ":" + port
74-
log.Printf("Security Warning: Non-local network!\n")
72+
if addrEnv := os.Getenv("ADDR"); addrEnv != "" {
73+
addr = addrEnv
7574
}
7675

7776
interceptors := connect.WithInterceptors(interceptor.NewAuthInterceptor())

0 commit comments

Comments
 (0)