V14: Backend changes to facilitate Preview mode in Bellissimma (#16279)
* Sends GUID instead of the numeric ID for SignalR Preview Hub * Add possibility to set cookies as HttpOnly * Set UMB_PREVIEW cookie as HttpOnly * fixup! Add possibility to set cookies as HttpOnly * Refactor ContentFinderByIdPath to more readable * Create ContentFinderByKeyPath reusing logic from ContentFinderByIdPath * Add a comment to DisableFindContentByIdPath setting * Append new content finder * Change ordering of content finders registrations * Refactor with a base class * Update/refactor and add tests regarding ContentFindersByIdentifier * Fix comment * Avoiding breaking change * Make usages use non-obsolete implementation * Fixed todo in config instead of use the one old legacy name even more. Also obsoleted the ContentFinderByIdPath * add `preview` as an allowed backoffice client route --------- Co-authored-by: Sven Geusens <sge@umbraco.dk> Co-authored-by: Bjarke Berg <mail@bergmania.dk> Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
93db1912a6
commit
295f6f8720
@@ -27,8 +27,8 @@ public class AspNetCoreCookieManager : ICookieManager
|
||||
|
||||
public string? GetCookieValue(string cookieName) => _httpContextAccessor.HttpContext?.Request.Cookies[cookieName];
|
||||
|
||||
public void SetCookieValue(string cookieName, string value) =>
|
||||
_httpContextAccessor.HttpContext?.Response.Cookies.Append(cookieName, value, new CookieOptions());
|
||||
public void SetCookieValue(string cookieName, string value, bool httpOnly) =>
|
||||
_httpContextAccessor.HttpContext?.Response.Cookies.Append(cookieName, value, new CookieOptions { HttpOnly = httpOnly });
|
||||
|
||||
public bool HasCookie(string cookieName) => !(GetCookieValue(cookieName) is null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user