nosprintfhostport

This commit is contained in:
Michael Yang 2024-05-21 21:53:44 -07:00
parent 8ffb51749f
commit dad7a987ae

View file

@ -3,6 +3,7 @@ package envconfig
import (
"fmt"
"log/slog"
"net"
"os"
"path/filepath"
"runtime"
@ -184,8 +185,8 @@ func LoadConfig() {
AllowOrigins = append(AllowOrigins,
fmt.Sprintf("http://%s", allowOrigin),
fmt.Sprintf("https://%s", allowOrigin),
fmt.Sprintf("http://%s:*", allowOrigin),
fmt.Sprintf("https://%s:*", allowOrigin),
fmt.Sprintf("http://%s", net.JoinHostPort(allowOrigin, "*")),
fmt.Sprintf("https://%s", net.JoinHostPort(allowOrigin, "*")),
)
}