mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 04:11:03 +00:00
allow websocket connections cross-origin
This commit is contained in:
parent
77246cc9c9
commit
3863617056
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@ package server
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"time"
|
||||
|
@ -29,6 +30,7 @@ const (
|
|||
var upgrader = websocket.Upgrader{
|
||||
ReadBufferSize: 1024,
|
||||
WriteBufferSize: 1024,
|
||||
CheckOrigin: func(r *http.Request) bool { return true },
|
||||
}
|
||||
|
||||
// GetEvents will upgrade the connection to a Websocket and will stream
|
||||
|
|
Loading…
Reference in a new issue