| |
| | |

CodersClub

 Forgot password?
 Register
Search
Author: jaideejung007
Collapse the left

Cloudflare (CDN) Can be Discuz! config to support HTTPS protocol?

[Copy link]

 Russia

Post time: 2014-10-06 19:03
| Show all posts
What the idea???
Just do not use HTTPS ?

 Turkey

Post time: 2015-01-31 15:48
| Show all posts
  1. Mixed Content: The page at 'https://droidim.com/forum.php' was loaded over HTTPS, but requested an insecure image 'http://droidim.com/template/win8mi_2nd_tech/src/info.png'. This content should also be served over HTTPS.

  2. 1 Mixed Content: The page at 'https://droidim.com/forum.php' was loaded over HTTPS, but requested an insecure image 'http://droidim.com/uc_server/images/noavatar_big.gif'. This content should also be served over HTTPS.

Copy the Code


How to redirect template http connection  to https

I applied CLoudflare 3x pagerule and

Find in source/class/discuz/discuz_application.php

  1. /*vot*/                $_G['isHTTPS'] = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? true : false;

  2.                 $_G['siteurl'] = dhtmlspecialchars('http'.($_G['isHTTPS'] ? 's' : '').'://'.$_SERVER['HTTP_HOST'].$sitepath.'/');
Copy the Code


Change to

  1.                 if(!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) $_G['isHTTPX'] = $_SERVER['HTTP_X_FORWARDED_PROTO'];
  2.                 if(!$_G['isHTTPX']) $_G['isHTTPX'] = ($_SERVER['HTTPS'] && strtolower($_SERVER['HTTPS']) != 'off') ? 'https' : 'http' ;
  3.                 $_G['siteurl'] = dhtmlspecialchars($_G['isHTTPX'].'://'.$_SERVER['HTTP_HOST'].$sitepath.'/');
Copy the Code


 Russia

Post time: 2015-01-31 18:35
| Show all posts
Add the file name and the line number.

 Turkey

Post time: 2015-01-31 20:21
| Show all posts
Edited by Pme at 2015-2-1 19:06

File

source/class/discuz/discuz_application.php

Line 383
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-05-17 12:24 GMT+3 , Processed in 0.045798 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list