mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2025-07-27 04:48:17 +02:00
Re-enable websockets
This commit is contained in:
parent
83aa49ad3b
commit
5bdce6e47b
1 changed files with 2 additions and 2 deletions
4
rdg.go
4
rdg.go
|
@ -154,10 +154,10 @@ var c = cache.New(5*time.Minute, 10*time.Minute)
|
||||||
func handleGatewayProtocol(w http.ResponseWriter, r *http.Request) {
|
func handleGatewayProtocol(w http.ResponseWriter, r *http.Request) {
|
||||||
connectionCache.Set(float64(c.ItemCount()))
|
connectionCache.Set(float64(c.ItemCount()))
|
||||||
if r.Method == MethodRDGOUT {
|
if r.Method == MethodRDGOUT {
|
||||||
//if r.Header.Get("Connection") != "upgrade" && r.Header.Get("Upgrade") != "websocket" {
|
if r.Header.Get("Connection") != "upgrade" && r.Header.Get("Upgrade") != "websocket" {
|
||||||
handleLegacyProtocol(w, r)
|
handleLegacyProtocol(w, r)
|
||||||
return
|
return
|
||||||
//}
|
}
|
||||||
r.Method = "GET" // force
|
r.Method = "GET" // force
|
||||||
conn, err := upgrader.Upgrade(w, r, nil)
|
conn, err := upgrader.Upgrade(w, r, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue