File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,11 +16,14 @@ function loginapp(cb) {
1616 const url = { url : tokenurlVal , headers : JSON . parse ( tokenheaderVal ) }
1717 chavy . get ( url , ( error , response , data ) => {
1818 const respcookie = response . headers [ 'Set-Cookie' ]
19- const signheaderObj = JSON . parse ( signheaderVal )
20- let signcookie = signheaderObj [ 'Cookie' ]
21- signcookie = signcookie . replace ( / d \. s i d = ( [ ^ ; ] * ) / , respcookie . match ( / d \. s i d = ( [ ^ ; ] * ) / ) [ 0 ] )
22- signheaderObj [ 'Cookie' ] = signcookie
23- signheaderVal = JSON . stringify ( signheaderObj )
19+ chavy . log ( `${ cookieName } , loginapp - respcookie: ${ respcookie } ` )
20+ if ( respcookie && respcookie . indexOf ( 'd.sid=' ) >= 0 ) {
21+ const signheaderObj = JSON . parse ( signheaderVal )
22+ let signcookie = signheaderObj [ 'Cookie' ]
23+ signcookie = signcookie . replace ( / d \. s i d = ( [ ^ ; ] * ) / , respcookie . match ( / d \. s i d = ( [ ^ ; ] * ) / ) [ 0 ] )
24+ signheaderObj [ 'Cookie' ] = signcookie
25+ signheaderVal = JSON . stringify ( signheaderObj )
26+ }
2427 cb ( )
2528 } )
2629}
You can’t perform that action at this time.
0 commit comments