Created
April 24, 2019 08:38
-
-
Save chrsin/71fafd53ef34cd6bc2fe54b69e3e3629 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
using System.Diagnostics.CodeAnalysis; | |
using System.Web.Http; | |
using Sitecore.Pipelines; | |
namespace MyWebsite | |
{ | |
[ExcludeFromCodeCoverage] | |
public class CustomMvcRoutes | |
{ | |
public void Process(PipelineArgs args) | |
{ | |
HttpConfiguration config = GlobalConfiguration.Configuration; | |
config.Filters.Add(new AuthenticationExceptionFilterAttribute()); //This handles authentication exceptions and creates a proper http response. | |
config.Filters.Add(new RemoveCookiesFilterAttribute()); //This removes any cookies set if an endpoint in our namespace is being hit. | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment