Skip to content
Snippets Groups Projects
Commit f94e73b1 authored by Bolke de Bruin's avatar Bolke de Bruin
Browse files

Fix some issues with gateway addresses

parent 50f6d343
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ type Config struct { ...@@ -44,7 +44,7 @@ type Config struct {
stateStore *cache.Cache stateStore *cache.Cache
Hosts []string Hosts []string
HostSelection string HostSelection string
GatewayAddress string GatewayAddress *url.URL
UsernameTemplate string UsernameTemplate string
NetworkAutoDetect int NetworkAutoDetect int
BandwidthAutoDetect int BandwidthAutoDetect int
...@@ -276,7 +276,7 @@ func (c *Config) HandleDownload(w http.ResponseWriter, r *http.Request) { ...@@ -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-Disposition", "attachment; filename="+fn)
w.Header().Set("Content-Type", "application/x-rdp") w.Header().Set("Content-Type", "application/x-rdp")
data := "full address:s:" + host + "\r\n" + 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" + "gatewaycredentialssource:i:5\r\n" +
"gatewayusagemethod:i:1\r\n" + "gatewayusagemethod:i:1\r\n" +
"gatewayprofileusagemethod:i:1\r\n" + "gatewayprofileusagemethod:i:1\r\n" +
......
...@@ -88,7 +88,7 @@ func main() { ...@@ -88,7 +88,7 @@ func main() {
url.Scheme = "https" url.Scheme = "https"
} }
url.Path = "callback" url.Path = "callback"
api.GatewayAddress = url.String() api.GatewayAddress = url
oauthConfig := oauth2.Config{ oauthConfig := oauth2.Config{
ClientID: conf.OpenId.ClientId, ClientID: conf.OpenId.ClientId,
......
...@@ -30,6 +30,9 @@ RUN git clone https://github.com/bolkedebruin/rdpgw.git /app && \ ...@@ -30,6 +30,9 @@ RUN git clone https://github.com/bolkedebruin/rdpgw.git /app && \
FROM scratch FROM scratch
# make tempdir in case filestore is used
ADD tmp.tar /
COPY --from=builder /opt/rdpgw /opt/rdpgw COPY --from=builder /opt/rdpgw /opt/rdpgw
COPY --from=builder /etc/passwd /etc/passwd COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /etc/ssl/certs /etc/ssl/certs COPY --from=builder /etc/ssl/certs /etc/ssl/certs
......
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment