Make WordPress Core

Ticket #50339: wordpress-tls-termination.diff

File wordpress-tls-termination.diff, 463 bytes (added by simosx, 5 years ago)

Enables HTTPS is HTTP_X_FORWARDED_PROTO is set to https

  • wp-admin/setup-config.php

    diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php
    index 4ae670d..117668e 100644
    a b define( 'WP_INSTALLING', true ); 
    1919 */
    2020define( 'WP_SETUP_CONFIG', true );
    2121
     22/**
     23 * Detect whether we are running behind a TLS Termination Proxy.
     24 */
     25if ( $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {
     26        $_SERVER['HTTPS']='on';
     27}
     28
    2229/**
    2330 * Disable error reporting
    2431 *