mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2026-03-31 16:06:35 +00:00
Re-enable websockets
This commit is contained in:
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user