Closed jakewrfoster closed 8 months ago
@jakewrfoster Do we want to replace the protocol scheme if the WP_SITEURL
and / or WP_HOME
constants are used, but leave the rest of the constant, or do we want to completely rely on the database value and ignore the constants?
Also, do we want to restrict this change to Pantheon only?
Description
Pantheon-maintains a wp-config-pantheon.php file that manipulates protocol scheme for HTTP requests. The file defaults to
http
unlessHTTP_USER_AGENT_HTTPS
is set and has the value ofon
. Obviously, this won't fire for CLI commands, which can create an issue wherein CLI (and other non-http) requests return the wrong protocol.Use Case
When non-http requests are made to pantheon sites (via WPCLI or cron, for example), the site's domain protocol matches the protocol in the database options for
siteurl
andhome
.