The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
20
stars
16
forks
source link
YARP and NotFoundHandler pipeline processing order #86
I have an installation using both the NotFoundHandler and Yarp reverse proxy. The NotFoundHandler is being loaded in the ConfigureServices method and Yarp is loaded in the Application builder Configure method.
Everything works as expected until you try to redirect a URL that also needs to be reverse proxied. In this instance, the reverse proxy gets the URL before the NotFoundHandler and this results in a 404. The redirector should change the path and then let the reverse proxy alter the URL, but the NotFoundHandler never gets called.
I have an installation using both the NotFoundHandler and Yarp reverse proxy. The NotFoundHandler is being loaded in the ConfigureServices method and Yarp is loaded in the Application builder Configure method.
Everything works as expected until you try to redirect a URL that also needs to be reverse proxied. In this instance, the reverse proxy gets the URL before the NotFoundHandler and this results in a 404. The redirector should change the path and then let the reverse proxy alter the URL, but the NotFoundHandler never gets called.
For example:
This is the NotFoundHandler URL that is mapped
Then the reverse proxy needs to adjust the browser URL to look like this:
The reverse proxy sees:
before the redirector can change the URL - even though it should be coming first in the pipeline.
Geta.NotFoundHandler.Optimiziely version 5.0.4 Yarp.ReverseProxy version 2.0.0 EPiServer.CMS version 12.13.2