Created
February 13, 2020 05:49
-
-
Save aaronmu/22bd671b9dd9e24502af4baca62b7827 to your computer and use it in GitHub Desktop.
This file contains 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 characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment