File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class JsonCachingProxy {
5555 }
5656
5757 /**
58- * Remove the domain portion of any cookies from the object
58+ * Remove the domain portion of any cookies from the object. Remove the secure attribute so we can set cookies to https targets
5959 * @param {Object } cookies - Express cookies array
6060 * @returns {Object[] } - Cookies with domain portion removed
6161 */
@@ -64,10 +64,12 @@ class JsonCachingProxy {
6464 let cookieParts = c . split ( ';' ) ;
6565 let newCookieParts = [ ] ;
6666
67+ console . log ( cookieParts ) ;
68+
6769 cookieParts . forEach ( c => {
68- if ( c . indexOf ( 'domain' ) === - 1 ) {
70+ if ( c . indexOf ( 'domain' ) === - 1 && c . indexOf ( 'secure' ) === - 1 ) {
6971 newCookieParts . push ( c ) ;
70- }
72+ }
7173 } ) ;
7274
7375 return newCookieParts . join ( ';' ) ;
You can’t perform that action at this time.
0 commit comments