mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2026-03-29 15:06:36 +00:00
Improve configurability
This commit is contained in:
13
main.go
13
main.go
@@ -89,7 +89,18 @@ func main() {
|
||||
TLSNextProto: make(map[string]func(*http.Server, *tls.Conn, http.Handler)), // disable http2
|
||||
}
|
||||
|
||||
http.HandleFunc("/remoteDesktopGateway/", protocol.HandleGatewayProtocol)
|
||||
// create the gateway
|
||||
handlerConfig := protocol.HandlerConf{
|
||||
TokenAuth: true,
|
||||
RedirectFlags: protocol.RedirectFlags{
|
||||
Clipboard: true,
|
||||
},
|
||||
}
|
||||
gw := protocol.Gateway{
|
||||
HandlerConf: &handlerConfig,
|
||||
}
|
||||
|
||||
http.HandleFunc("/remoteDesktopGateway/", gw.HandleGatewayProtocol)
|
||||
http.HandleFunc("/connect", handleRdpDownload)
|
||||
http.Handle("/metrics", promhttp.Handler())
|
||||
http.HandleFunc("/callback", handleCallback)
|
||||
|
||||
Reference in New Issue
Block a user