File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/SilkierQuartz/Configuration Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,16 @@ public static IServiceCollection AddSilkierQuartz(
3232 services . AddSingleton ( authenticationOptions ) ;
3333 if ( authenticationOptions . AccessRequirement != SilkierQuartzAuthenticationOptions . SimpleAccessRequirement . AllowAnonymous )
3434 {
35+ var normalizedVirtualPath = $ "{ options . VirtualPathRoot } { ( options . VirtualPathRoot . EndsWith ( '/' ) ? "" : "/" ) } ";
36+ var cookiePath = $ "{ options . BasePath } { ( options . BasePath . EndsWith ( '/' ) ? "" : "/" ) } { normalizedVirtualPath . Trim ( '/' ) } ";
3537 services
3638 . AddAuthentication ( authenticationOptions . AuthScheme )
3739 . AddCookie ( authenticationOptions . AuthScheme , cfg =>
3840 {
3941 cfg . Cookie . Name = authenticationOptions . CookieName ;
40- cfg . Cookie . Path = options . VirtualPathRoot ;
41- cfg . LoginPath = $ "{ options . VirtualPathRoot } { ( options . VirtualPathRoot . EndsWith ( '/' ) ? "" : "/" ) } Authenticate/Login";
42- cfg . AccessDeniedPath = $ "{ options . VirtualPathRoot } { ( options . VirtualPathRoot . EndsWith ( '/' ) ? "" : "/" ) } Authenticate/Login";
42+ cfg . Cookie . Path = cookiePath ;
43+ cfg . LoginPath = $ "{ normalizedVirtualPath } Authenticate/Login";
44+ cfg . AccessDeniedPath = $ "{ normalizedVirtualPath } Authenticate/Login";
4345 cfg . ExpireTimeSpan = TimeSpan . FromDays ( 7 ) ;
4446 cfg . SlidingExpiration = true ;
4547 } ) ;
You can’t perform that action at this time.
0 commit comments