1

Our environment requires that our Windows Server 2019 RDS Gateway (with the HTML 5 web client installed on it) be behind an nginx web proxy. The website portion of things work fine, but the connection drops when trying to connect the RDS terminal session app in the HTML 5 web client. Using the RDS client works just fine.

Here's our setup:

  • Server 2019 RDS gateway is gateway.corp.domain.com
  • RDS gateway is configured to use remote.domain.com as the public address
  • remote.domain.com is pointed to the nginx web server
  • the nginx web server (using the correct web socket headers) passes traffic to and from the RDS gateway (gateway.corp.domain.com)

On the client side, we're getting the error in the web browser:

The connection to the remote PC was lost

In the web inspector console, we're seeing an error about not being able to establish a web socket connection:

Gateway channel creation failed with error code=2147965402

and

Could not connect to wss://remote.domain.com/remotedesktopgateway/...

Does anyone have any insight on what we can do to fix this so we can access our RDS apps through the web client?

I can't seem to find any documentation on this to see what exactly is needed by the HTML 5 web client server. Unfortunately, removing the reverse web proxy is not an option.

1

I finally figured it out while fixing another issue: the issue was caused by an overly restrictive Content-Security-Policy header added by the nginx reverse proxy.

Before, the header only had default-src; now it has image-src and media-src to allow data: and blob: data types. This is the header that is working currently (probably overly permissive, but it works until we can review it further):

default-src * data: 'unsafe-eval' 'unsafe-inline'; img-src * data: blob:; media-src * data: blob:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.