0

How can you determine the current request URL if using off box SSL termination?

E.g.

  1. Browser has url httpS://yourserver/
  2. SSL Termination decrypts and sends onto http://yourserver
  3. IIS/ASP.NET receives request at http://yourserver

At (3) if you use Context.Request.Url, Page.Request.Url or Page.Request.RawUrl it show a url with a http protocol and not httpS

How do get the public httpS URL that was origionally used at (1) in this case?

Ryan
  • 23,871
  • 24
  • 86
  • 132

1 Answers1

0

The convention used for Microsoft Products is to add a header at the reverse proxy.

Front-End-Https : On

So you know the http url is really https.

You could also add in your own header containing the original URL if you did something like URL translation (e.g. something like "Original-Uri").

This page shows how to do this using IIS AAR as the reverse proxy, though in my testing I could only get headers to pass through if they are prefixed with HTTP_ (which is later stripped out).

Community
  • 1
  • 1
Ryan
  • 23,871
  • 24
  • 86
  • 132