File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11console . log ( 'Starting test-login.js' ) ;
22
3+ function htmlEncode ( text ) {
4+ const tempDiv = document . createElement ( 'div' ) ;
5+ tempDiv . innerText = text ;
6+ return tempDiv . innerHTML ;
7+ }
8+
39const rootDiv = document . getElementById ( 'root' ) ;
410
511if ( ! rootDiv ) {
@@ -17,20 +23,19 @@ document.cookie
1723 cookieMap [ pair [ 0 ] ] = decodeURIComponent ( pair [ 1 ] ) ;
1824 } ) ;
1925
20- function htmlEncode ( text ) {
21- const tempDiv = document . createElement ( 'div' ) ;
22- tempDiv . innerText = text ;
23- return tempDiv . innerHTML ;
24- }
25-
2626var loggedInUser = ( cookieMap [ 'rscommunity-logged-in-user' ] || '' ) . trim ( ) ;
2727
2828var serviceUrl = '' ;
2929if ( document . location . hostname . toUpperCase ( ) !== 'LOCALHOST' ) {
3030 serviceUrl = 'https://service.rushstack.io' ;
3131}
3232
33- document . cookie = 'rscommunity-login-return-path=' + encodeURIComponent ( document . location . pathname ) + '; SameSite=Strict;'
33+ document . cookie = [
34+ 'rscommunity-login-return-path=' + encodeURIComponent ( document . location . pathname ) ,
35+ 'SameSite=Strict' ,
36+ 'Domain=' + document . location . hostname ,
37+ 'Path=/'
38+ ] . join ( ';' ) ;
3439
3540if ( loggedInUser ) {
3641 // prettier-ignore
You can’t perform that action at this time.
0 commit comments