From c6cc1ef6d67fd068ca3f2d847442b90ebea6ad1b Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 20 Jun 2018 10:46:20 -0700 Subject: [PATCH] Apply attribute to page model rather than handler --- .../Areas/AzureAD/Pages/Account/Error.cshtml.cs | 4 ++-- .../Areas/AzureADB2C/Pages/Account/Error.cshtml.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/Error.cshtml.cs b/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/Error.cshtml.cs index 2a56285057..32ad8b4e7c 100644 --- a/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/Error.cshtml.cs +++ b/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/Error.cshtml.cs @@ -13,6 +13,7 @@ namespace Microsoft.AspNetCore.Authentication.AzureAD.UI.Internal /// directly from your code.This API may change or be removed in future releases /// [AllowAnonymous] + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel { /// @@ -31,10 +32,9 @@ namespace Microsoft.AspNetCore.Authentication.AzureAD.UI.Internal /// This API supports infrastructure and is not intended to be used /// directly from your code.This API may change or be removed in future releases /// - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/Error.cshtml.cs b/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/Error.cshtml.cs index 466f293bec..313cb372d3 100644 --- a/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/Error.cshtml.cs +++ b/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/Error.cshtml.cs @@ -13,6 +13,7 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Internal /// directly from your code.This API may change or be removed in future releases /// [AllowAnonymous] + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public class ErrorModel : PageModel { /// @@ -31,10 +32,9 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Internal /// This API supports infrastructure and is not intended to be used /// directly from your code.This API may change or be removed in future releases /// - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public void OnGet() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; } } -} \ No newline at end of file +}