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() { |
| 1625 | 1625 | } |
| 1626 | 1626 | } elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' === (string) $_SERVER['SERVER_PORT'] ) ) { |
| 1627 | 1627 | return true; |
| | 1628 | } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && ('https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) ) { |
| | 1629 | return true; |
| 1628 | 1630 | } |
| 1629 | 1631 | |
| 1630 | 1632 | return false; |