CloudFlare Flexible SSL - Version 1.1.0

Version Description

UPDATED: Supported WordPress Version UPDATED: Also works for any standard SSL Proxy scenario that uses HTTP_X_FORWARDED_PROTO - it doesn't have to CloudFlare

Download this release

Release Info

Developer paultgoodchild
Plugin Icon 128x128 CloudFlare Flexible SSL
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.0 to 1.1.0

Files changed (2) hide show
  1. plugin.php +20 -5
  2. readme.txt +9 -4
plugin.php CHANGED
@@ -3,13 +3,28 @@
3
  * Plugin Name: CloudFlare Flexible SSL
4
  * Plugin URI: http://icwp.io/2f
5
  * Description: Fix For CloudFlare Flexible SSL Redirect Loop For WordPress
6
- * Version: 1.0.0
7
  * Text Domain: cloudflare-flexible-ssl
8
  * Author: iControlWP
9
  * Author URI: http://icwp.io/2e
10
  */
11
 
12
- // Simple 1st version. More to come.
13
- if ( isset( $_SERVER['HTTP_CF_VISITOR'] ) && strpos( $_SERVER['HTTP_CF_VISITOR'], 'https' ) !== false ) {
14
- $_SERVER['HTTPS'] = 'on';
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Plugin Name: CloudFlare Flexible SSL
4
  * Plugin URI: http://icwp.io/2f
5
  * Description: Fix For CloudFlare Flexible SSL Redirect Loop For WordPress
6
+ * Version: 1.1.0
7
  * Text Domain: cloudflare-flexible-ssl
8
  * Author: iControlWP
9
  * Author URI: http://icwp.io/2e
10
  */
11
 
12
+ class ICWP_Cloudflare_Flexible_SSL {
13
+
14
+ public function __construct() {}
15
+
16
+ public function run() {
17
+
18
+ $aIcwpHttpsServerOpts = array( 'HTTP_CF_VISITOR', 'HTTP_X_FORWARDED_PROTO' );
19
+ foreach( $aIcwpHttpsServerOpts as $sOption ) {
20
+
21
+ if ( !empty( $_SERVER[ $sOption ] ) && ( strpos( $_SERVER[ $sOption ], 'https' ) !== false ) ) {
22
+ $_SERVER[ 'HTTPS' ] = 'on';
23
+ break;
24
+ }
25
+ }
26
+ }
27
+ }
28
+
29
+ $oIcwpCfFlexibleSslCheck = new ICWP_Cloudflare_Flexible_SSL();
30
+ $oIcwpCfFlexibleSslCheck->run();
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === Plugin Name ===
2
- Contributors: paultgoodchild, dlgoodchild
3
  Donate link: http://icwp.io/q
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
- Tags: CloudFlare, SSL, Flexible SSL, Universal SSL, redirect loop
7
  Requires at least: 3.2.0
8
- Tested up to: 4.0
9
- Stable tag: 1.0.0
10
 
11
  Fix For CloudFlare Flexible SSL Redirect Loop For WordPress.
12
 
@@ -46,6 +46,11 @@ For full installation instructions, please review the following article: [Instal
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
49
  = 1.0.0 =
50
 
51
  First Release
1
  === Plugin Name ===
2
+ Contributors: paultgoodchild
3
  Donate link: http://icwp.io/q
4
  License: GPLv3
5
  License URI: http://www.gnu.org/licenses/gpl.html
6
+ Tags: CloudFlare, SSL, Flexible SSL, Universal SSL, redirect loop, HTTPS, HTTP_X_FORWARDED_PROTO
7
  Requires at least: 3.2.0
8
+ Tested up to: 4.3
9
+ Stable tag: 1.1.0
10
 
11
  Fix For CloudFlare Flexible SSL Redirect Loop For WordPress.
12
 
46
 
47
  == Changelog ==
48
 
49
+ = 1.1.0 =
50
+
51
+ UPDATED: Supported WordPress Version
52
+ UPDATED: Also works for any standard SSL Proxy scenario that uses HTTP_X_FORWARDED_PROTO - it doesn't have to CloudFlare
53
+
54
  = 1.0.0 =
55
 
56
  First Release