The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
https on cirtain pages
#1
hello i have created and android app which is a webview of my UserSpice website.
a glitch in android has occurred so that https sites dont show.
i have force https enabled and i don't want to turn it off.
is there a way to disable force https on cirtain pages?
Busy Tech
Common sense is not common
http://busy.eu.org
  Reply
#2
Hmm. I don't usually tell people to edit the header directly, but I think that's the cleanest way to do it.

Note that when you're doing updates, you should make sure that we didn't edit users/includes/header.php

So what you'll do is create an array of pages you don't want ssl for in this snippet below and use it to replace the if force_ssl == 1 thing in header.php

Code:
if ($settings->force_ssl==1){
Code:
$nossl = ['index.php','account.php'];
Code:
if(!in_array($currentPage,$nossl)){
Code:
if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) {
Code:
$url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
Code:
Redirect::to($url);
Code:
exit;
Code:
}
Code:
}
Code:
}
  Reply
#3
thanks this helped alot
Busy Tech
Common sense is not common
http://busy.eu.org
  Reply
#4
Glad to help!
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)