Enable compression context takeover, tweak debug mode options
This commit is contained in:
parent
75c0694c03
commit
6d6a63878b
3
main.go
3
main.go
|
@ -53,11 +53,12 @@ func main() {
|
||||||
|
|
||||||
wsOpts = &websocket.AcceptOptions{
|
wsOpts = &websocket.AcceptOptions{
|
||||||
OriginPatterns: args.Origins,
|
OriginPatterns: args.Origins,
|
||||||
|
CompressionMode: websocket.CompressionContextTakeover,
|
||||||
}
|
}
|
||||||
|
|
||||||
if args.Debug {
|
if args.Debug {
|
||||||
log.Println("starting in debug mode, allowing any WebSocket origin host")
|
log.Println("starting in debug mode, allowing any WebSocket origin host")
|
||||||
wsOpts.OriginPatterns = []string{"*"}
|
wsOpts.InsecureSkipVerify = true
|
||||||
} else {
|
} else {
|
||||||
if !version.VersionSet() {
|
if !version.VersionSet() {
|
||||||
log.Fatal("running production build without version set")
|
log.Fatal("running production build without version set")
|
||||||
|
|
Loading…
Reference in New Issue