Fix some issues with gateway addresses

This commit is contained in:
Bolke de Bruin
2022-08-26 10:06:43 +02:00
parent 50f6d343f1
commit f94e73b1ec
4 changed files with 6 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ type Config struct {
stateStore *cache.Cache
Hosts []string
HostSelection string
GatewayAddress string
GatewayAddress *url.URL
UsernameTemplate string
NetworkAutoDetect int
BandwidthAutoDetect int
@@ -276,7 +276,7 @@ func (c *Config) HandleDownload(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Disposition", "attachment; filename="+fn)
w.Header().Set("Content-Type", "application/x-rdp")
data := "full address:s:" + host + "\r\n" +
"gatewayhostname:s:" + c.GatewayAddress + "\r\n" +
"gatewayhostname:s:" + c.GatewayAddress.Host + "\r\n" +
"gatewaycredentialssource:i:5\r\n" +
"gatewayusagemethod:i:1\r\n" +
"gatewayprofileusagemethod:i:1\r\n" +

View File

@@ -88,7 +88,7 @@ func main() {
url.Scheme = "https"
}
url.Path = "callback"
api.GatewayAddress = url.String()
api.GatewayAddress = url
oauthConfig := oauth2.Config{
ClientID: conf.OpenId.ClientId,