microsoft / SPID-and-Digital-Identity-Enabler

This repo contains the SPIDProxy code and several ADFS/Azure B2C related scripts and assets. SPIDProxy allows to communicate with SPID, CIE and eIDAS. The repo also contains a web app enabling CNS authentication through ADFS and AAD B2C.
MIT License
27 stars 12 forks source link

Support reverse proxies #29

Closed fume closed 2 years ago

fume commented 2 years ago

Add support to reverse proxies leveraging the ForwardedHeadersMiddleware. When the ASPNETCORE_FORWARDEDHEADERS_ENABLED env variable is set to true, the ForwardedHeadersOptions are overridden using the ForwardedHeaders configuration section.

Whenever we need a SPIDProxy endpoint url, we use the SAMLService to retrieve it since it uses the HttpContext Scheme and Host which are overridden by the ForwardedHeadersMiddleware.

Fixes #2