Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article describes the steps that need to be followed so that the Runtime in IIS runs behind a reverse proxy where the X-Forwarded headers are set.

X-Forwarded Headers

It is not uncommon when installing Blueriq on a virtual machine in the cloud to not expose the machine directly to the internet, but to configure it behind a reverse proxy. This is done to limit direct access to virtual machine and to only allow traffic over ports 80 and 433. When this is done you will need to configure the X-Forwarded headers for the Runtime to work as intended. The Blueriq Runtime uses HATEOAS to construct urls to where resources can be found, HATEOAS itself uses the X-FORWARDED headers to determine the original request url which was used to reach the Blueriq Runtime. Without configuring the X-Forwarded headers, the Runtime would return build resource urls based on the request it got from the reserve proxy. 

...

When the X-Forwarded headers are configuredin the proxy to take over the original request details the Runtime will be able to determine the correct resource urls.

Blueriq Installer

Out of the box the Blueriq installer will already configure two X-Forwarded headers; X-Forwarded-Proto, and X-Forwarded-Host. This is done due to that Blueriq uses IIS to proxy requests to internal addresses for the Runtime and Studio applications. Without the X-Forwarded headers the local address of the machine would be used to create resource urls, instead of the incoming request url.

Reconfiguring the X-Forwarded headers

Due to that Blueriq already configures the X-Forwarded headers out of the box we need to adjust them to work behind a proxy itself, as we do not want to reconfigure X-Forwarded headers of the proxied request. When doing so you will build resource urls based upon the proxied request url instead of the original request url. 

...