Skip to content

Commit e294e3c

Browse files
committed
Build: Fix login cookies in jquery-wp-docker
1 parent fa463ed commit e294e3c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sites.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,13 @@ function jquery_default_site_options() {
408408
// However, sites that use jquery-static-index.php cause index pages
409409
// to redirect to live sites in local development. This filter does not
410410
// prevent the redirect, but changes the redirect to the local site.
411+
//
412+
// WordPress/wp-login.php requires 'home' to use a full URL.
413+
// If it uses a protocol-relative URL, it uses the entire URL as the path=
414+
// and thus cause cookies to never be sent by the browser.
411415
if ( JQUERY_STAGING ) {
412-
$defaults['home'] = '//' . jquery_site_expand( JQUERY_LIVE_SITE );
413-
$defaults['siteurl'] = '//' . jquery_site_expand( JQUERY_LIVE_SITE );
416+
$defaults['home'] = 'http://' . jquery_site_expand( JQUERY_LIVE_SITE );
417+
$defaults['siteurl'] = 'http://' . jquery_site_expand( JQUERY_LIVE_SITE );
414418
}
415419
return $defaults;
416420

0 commit comments

Comments
 (0)