Make WordPress Core

Ticket #61915: 61915-fix-is_ssl-adds-check-for-ssl-when-behind-a-proxy-or-load-balancer.diff

File 61915-fix-is_ssl-adds-check-for-ssl-when-behind-a-proxy-or-load-balancer.diff, 820 bytes (added by tbfVladd, 18 months ago)

correctly named patch/diff file :o)

  • wp-includes/load.php

    From e3f00bb19e3082a457954f8c7697d9d83d6a76d3 Mon Sep 17 00:00:00 2001
    From: Andrew Freemantle <AndrewFreemantle@users.noreply.github.com>
    Date: Fri, 23 Aug 2024 11:30:17 +0100
    Subject: [PATCH] fix(is_ssl): adds check for ssl when behind a proxy or load
     balancer
    
    ---
     wp-includes/load.php | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/wp-includes/load.php b/wp-includes/load.php
    index b0b8209235..d0a788d16a 100644
    a b function is_ssl() { 
    16251625                }
    16261626        } elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' === (string) $_SERVER['SERVER_PORT'] ) ) {
    16271627                return true;
     1628        } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && ('https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) ) {
     1629                return true;
    16281630        }
    16291631
    16301632        return false;