fixed theme and language controller not setting no-cache, no-store header
This commit is contained in:
parent
96d589df54
commit
3960484ce8
|
@ -7,6 +7,7 @@ namespace Wave.Controllers;
|
|||
[Route("/language")]
|
||||
public class LanguageController : ControllerBase {
|
||||
[HttpGet("{culture}")]
|
||||
[ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)]
|
||||
public IActionResult SetLanguage(string culture, string returnUrl = "") {
|
||||
Response.Cookies.Append(
|
||||
CookieRequestCultureProvider.DefaultCookieName,
|
||||
|
|
|
@ -6,12 +6,14 @@ namespace Wave.Controllers;
|
|||
[Route("/theme")]
|
||||
public class ThemeController : ControllerBase {
|
||||
[HttpGet("")]
|
||||
[ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)]
|
||||
public IActionResult SetTheme(string returnUrl = "") {
|
||||
Response.Cookies.Delete(".Wave.Theme");
|
||||
return LocalRedirect(string.IsNullOrWhiteSpace(returnUrl) ? "/" : returnUrl);
|
||||
}
|
||||
|
||||
[HttpGet("{theme}")]
|
||||
[ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)]
|
||||
public IActionResult SetTheme(string? theme, string returnUrl = "") {
|
||||
if (theme is null) {
|
||||
Response.Cookies.Delete(".Wave.Theme");
|
||||
|
|
Loading…
Reference in a new issue