[wp-trac] [WordPress Trac] #34912: wp-admin/load-styles.php not serving multiple assets over HTTPS
WordPress Trac
noreply at wordpress.org
Tue Dec 8 12:54:50 UTC 2015
#34912: wp-admin/load-styles.php not serving multiple assets over HTTPS
---------------------------+-----------------------------
Reporter: ElastisysLars | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
My setup is a reverse-proxy SSL-terminated install, where WordPress is
served only over HTTP (but the reverse proxy sets the X-Forwarded-Proto
header). In my wp-config.php I have the following pertinent settings:
{{{
define('WP_DEBUG', false);
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
define('FORCE_SSL_ADMIN', true);
}}}
I have run in to the interesting issue with WordPress 4.3.1 that my admin
area winds up with broken stylesheets '''when served over HTTPS'''. I have
noted that requests such as:
{{{
https://SERVER_GOES_HERE/wp-admin/load-
styles.php?c=0&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-
check&ver=4.3.1
}}}
result in HTTP 200, but with a zero body length. However, when requesting
a single resource:
{{{
https://SERVER_GOES_HERE/wp-admin/load-
styles.php?c=0&dir=ltr&load=dashicons&ver=4.3.1
}}}
I get a reasonable response.
Both types of requests work fine and provide the result one would expect
every time when served over regular unsecured HTTP (bypassing my reverse
proxy).
Looking a bit further, I noticed that wp-admin/load-styles.php failed, but
wp-admin/load-scripts.php did not.
Looking even further, I found that setting
{{{
define('SCRIPT_DEBUG', true);
}}}
in wp-config.php, I actually get it working, even over HTTPS!
So, something apparently is fishy, but I am neither a WordPress expert nor
a PHP programmer. Can someone help me figure this out?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34912>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list