Make WordPress Core

Ticket #50339: setup-check-if-behind-tls-termination-proxy.diff

File setup-check-if-behind-tls-termination-proxy.diff, 464 bytes (added by simosx, 4 years ago)

Check whether we run behind a TLS Termination Proxy

  • wp-admin/setup-config.php

    diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php
    index 4ae670d..52cea1d 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_UPGRADE_INSECURE_REQUESTS'] == 1) {
     26        $_SERVER['HTTPS']='on';
     27}
     28
    2229/**
    2330 * Disable error reporting
    2431 *