Created
February 13, 2020 05:49
-
-
Save aaronmu/22bd671b9dd9e24502af4baca62b7827 to your computer and use it in GitHub Desktop.
Revisions
-
aaronmu created this gist
Feb 13, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ type ChangesRequestSchemeBasedOnXForwardedProto(next : RequestDelegate) = member this.Invoke(context : HttpContext) = let xForwardedProto = context.Request.Headers.["X-Forwarded-Proto"] if xForwardedProto = (StringValues "https") then context.Request.Scheme <- "https" else () next.Invoke(context)