File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -93,14 +93,15 @@ const cookieConfig = {
9393 cookieTimeToLiveInSeconds : parseInt ( config . DEFAULT_SESSION_EXPIRATION , 10 )
9494} ;
9595const sessionStore = new SessionStore ( new Redis ( `redis://${ config . CACHE_SERVER } ` ) ) ;
96- app . use ( SessionMiddleware ( cookieConfig , sessionStore ) ) ;
96+
97+ app . use ( config . EXCLUDED_PATHS , SessionMiddleware ( cookieConfig , sessionStore ) ) ;
9798
9899const csrfProtectionMiddleware = CsrfProtectionMiddleware ( {
99100 sessionStore,
100101 enabled : true ,
101102 sessionCookieName : config . COOKIE_NAME
102103} ) ;
103- app . use ( csrfProtectionMiddleware ) ;
104+ app . use ( config . EXCLUDED_PATHS , csrfProtectionMiddleware ) ;
104105
105106app . set ( "views" , path . join ( __dirname , "views" ) ) ;
106107app . set ( "view engine" , "html" ) ;
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ export const CLOSED_PENDING_PAYMENT = "closed pending payment";
4444export const PAYMENTS = "/payments" ;
4545export const YOUR_FILINGS_PATH = "/user/transactions" ;
4646
47+ export const EXCLUDED_PATHS = / \/ r e g i s t e r - a n - o v e r s e a s - e n t i t y \/ ( (? ! h e a l t h c h e c k ) .) * / ;
48+
4749// FEATURE FLAGS
4850export const SHOW_SERVICE_OFFLINE_PAGE = getEnvironmentValue ( "SHOW_SERVICE_OFFLINE_PAGE" ) ;
4951export const FEATURE_FLAG_ENABLE_TRUSTS_WEB = getEnvironmentValue ( 'FEATURE_FLAG_ENABLE_TRUSTS_WEB_07112022' , 'false' ) ;
You can’t perform that action at this time.
0 commit comments