You plan to deploy an ASP.NET Core MVC web application to an internal server cluster that runs Kestrel
on Linux. The server cluster hosts many other web applications. All applications are behind a Nginx load
balancer.
You need to ensure that the application meets the following requirements:
Secure against man-in-the-middle attacks.

Allow Open ID Connect authentication.

Cache responses using HTTP caching.

Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Correct Answer: A,C
Explanation/Reference:
Explanation:
A: When the port number 0 is specified, Kestrel dynamically binds to an available port. When the app is
run, the console window output indicates the dynamic port where the app can be reached.
C: Because requests are forwarded by reverse proxy, we must use the Forwarded Headers Middleware
from the Microsoft.AspNetCore.HttpOverrides package. The middleware updates the Request.Scheme,
using the X-Forwarded-Proto header, so that redirect URIs and other security policies work correctly.
References:
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.2
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.2