Skip to content
Snippets Groups Projects
Commit da40e090 authored by Alan Bell's avatar Alan Bell
Browse files

fix #9 redirect to configured site url if the protocol or host is wrong

parent ec0cbfe4
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,12 @@ class Vtiger_WebUI extends Vtiger_EntryPoint {
// common utils api called, depend on this variable right now
$currentUser = $this->getLogin();
vglobal('current_user', $currentUser);
//check we are being connected to on the right host and protocol
global $site_URL;
if ((stripos($site_URL,$_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST']) !== 0)){
header("Location: $site_URL",TRUE,301);
die();
}
global $default_language;
vglobal('default_language', $default_language);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment