alleyinteractive / wp-alleyvate

Defaults for WordPress sites by Alley.
GNU General Public License v2.0
16 stars 2 forks source link

Pantheon site protocol scheme should match the db value regardless of request type #85

Closed jakewrfoster closed 3 months ago

jakewrfoster commented 3 months ago

Description

Pantheon-maintains a wp-config-pantheon.php file that manipulates protocol scheme for HTTP requests. The file defaults to http unless HTTP_USER_AGENT_HTTPS is set and has the value of on. 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 and home.

anubisthejackle commented 3 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?

anubisthejackle commented 3 months ago

Also, do we want to restrict this change to Pantheon only?