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.
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 443. 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.
For example:
Without configuring the X-Forwarded headers on the proxy the following will happen when sending a request to test.example.com/Runtime.
When the X-Forwarded headers are configured in the proxy to take over the original request details, the Runtime will be able to determine the correct resource urls.
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.
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.
In case when Runtime is served via IIS which is configured to proxy request to actual Runtime url, just like it done when using the Blueriq Installer to setup a Blueriq environment.