mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
websocket fix attempt
This commit is contained in:
parent
e9b2079599
commit
668639e484
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,9 @@ func StatsWS(cfg *config.Config, w http.ResponseWriter, r *http.Request) {
|
||||||
if len(originPats) == 0 {
|
if len(originPats) == 0 {
|
||||||
U.Logger.Warnf("no match domains configured, accepting websocket request from all origins")
|
U.Logger.Warnf("no match domains configured, accepting websocket request from all origins")
|
||||||
originPats = []string{"*"}
|
originPats = []string{"*"}
|
||||||
|
} else {
|
||||||
|
localAddresses := []string{"127.0.0.1", "10.0.*.*", "172.16.*.*", "192.168.*.*"}
|
||||||
|
originPats = append(originPats, localAddresses...)
|
||||||
}
|
}
|
||||||
if common.IsDebug {
|
if common.IsDebug {
|
||||||
originPats = []string{"*"}
|
originPats = []string{"*"}
|
||||||
|
|
Loading…
Add table
Reference in a new issue