Background:
I am trying to get my endpoint URL from HttpContext for attribute validation work where the URL needed to be fully identical. The problem happens when I try the get the full URL, where the scheme will always be http instead of https.
During testing using Postman, my GET URL is https.
e.g https://endpoint/id?access_token=xxx
Code sample:
public ProofKeyContextFactory Create(HttpContext httpContext)
{
var endpointUrl = httpContext.Request
.GetDisplayUrl()
.ToUpperInvariant();
_logger.LogInformation("Endpoint URL: {EndpointUrl}", endpointUrl);
}
When I check log, the endpoint will be HTTP://ENDPOINT/ID?ACCESS_TOKEN=XXX
instead with HTTPS.
I tried using httpContext.Request.Scheme
but still returning https
What cause the SSL scheme to be terminated?