Adds CookiePath to SessionDefaults
Adds CookiePath to SessionDefaults Revert "Adds CookiePath to SessionDefaults" This reverts commit d025a89cbb555b5b92cb5de2dc848da036021301. Remove extra tab Revert "Remove extra tab" This reverts commit 80b1e4976a902a5e507702b1e46e57dec0c72da4. Change tab to spaces Adds CookiePath to SessionDefaults
This commit is contained in:
parent
653cb005cb
commit
177d1ffb64
|
|
@ -8,5 +8,6 @@ namespace Microsoft.AspNet.Session
|
|||
public static class SessionDefaults
|
||||
{
|
||||
public static string CookieName = ".AspNet.Session";
|
||||
public static string CookiePath = "/";
|
||||
}
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ namespace Microsoft.AspNet.Session
|
|||
{
|
||||
Domain = _options.CookieDomain,
|
||||
HttpOnly = _options.CookieHttpOnly,
|
||||
Path = _options.CookiePath ?? "/",
|
||||
Path = _options.CookiePath ?? SessionDefaults.CookiePath,
|
||||
};
|
||||
|
||||
_context.Response.Cookies.Append(_options.CookieName, _sessionKey, cookieOptions);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Session
|
|||
/// <summary>
|
||||
/// Determines the path used to create the cookie. The default value is "/" for highest browser compatibility.
|
||||
/// </summary>
|
||||
public string CookiePath { get; set; } = "/";
|
||||
public string CookiePath { get; set; } = SessionDefaults.CookiePath;
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the browser should allow the cookie to be accessed by client-side JavaScript. The
|
||||
|
|
|
|||
Loading…
Reference in New Issue