Enable compression context takeover, tweak debug mode options

This commit is contained in:
zikaeroh 2020-05-30 12:06:27 -07:00
parent 75c0694c03
commit 6d6a63878b
1 changed files with 3 additions and 2 deletions

View File

@ -52,12 +52,13 @@ func main() {
log.Printf("starting codies server, version %s", version.Version())
wsOpts = &websocket.AcceptOptions{
OriginPatterns: args.Origins,
OriginPatterns: args.Origins,
CompressionMode: websocket.CompressionContextTakeover,
}
if args.Debug {
log.Println("starting in debug mode, allowing any WebSocket origin host")
wsOpts.OriginPatterns = []string{"*"}
wsOpts.InsecureSkipVerify = true
} else {
if !version.VersionSet() {
log.Fatal("running production build without version set")