Merge pull request #7 from hishamco/dev
Adds CookiePath to SessionDefaults
This commit is contained in:
commit
c2cbd62eec
|
|
@ -8,5 +8,6 @@ namespace Microsoft.AspNet.Session
|
|||
public static class SessionDefaults
|
||||
{
|
||||
public static string CookieName = ".AspNet.Session";
|
||||
public static string CookiePath = "/";
|
||||
}
|
||||
}
|
||||
|
|
@ -126,7 +126,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