Don't cache AuthenticationController calls including GetRemainingTimeoutSeconds (fix for 11011)

This commit is contained in:
Philippe Guilmette
2021-09-02 08:13:14 -04:00
committed by Michael Latouche
parent 540740e802
commit 2de22b6394
2 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,6 @@ using Umbraco.Core.Models.Identity;
using Umbraco.Core.Services;
using Umbraco.Web.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Mvc;
using Umbraco.Web.Security;
using Umbraco.Web.WebApi;
using Umbraco.Web.WebApi.Filters;
@@ -34,10 +33,11 @@ namespace Umbraco.Web.Editors
/// <summary>
/// The API controller used for editing content
/// </summary>
[PluginController("UmbracoApi")]
[Mvc.PluginController("UmbracoApi")]
[ValidationFilter]
[AngularJsonOnlyConfiguration]
[IsBackOffice]
[DisableBrowserCache]
public class AuthenticationController : UmbracoApiController
{
private BackOfficeUserManager<BackOfficeIdentityUser> _userManager;

View File

@@ -62,7 +62,7 @@ namespace Umbraco.Web.Security
response.ContentType = "application/json; charset=utf-8";
response.StatusCode = 200;
response.Headers.Add("Cache-Control", new[] { "no-cache" });
response.Headers.Add("Cache-Control", new[] { "no-store", "must-revalidate", "no-cache", "max-age=0" });
response.Headers.Add("Pragma", new[] { "no-cache" });
response.Headers.Add("Expires", new[] { "-1" });
response.Headers.Add("Date", new[] { _authOptions.SystemClock.UtcNow.ToString("R") });