Commit 790cde0d authored by George Popoff's avatar George Popoff

change to relative path in auth controller. Remove dynamic base_url changing

parent 00fb5562
...@@ -23,7 +23,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ...@@ -23,7 +23,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| a PHP script and you can easily do that on your own. | a PHP script and you can easily do that on your own.
| |
*/ */
$config['base_url'] = APP_URL;
$config['base_url'] = 'http://eterfund.ru/api/typos/cp/';
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -19,7 +19,7 @@ class Authorization extends CI_Controller { ...@@ -19,7 +19,7 @@ class Authorization extends CI_Controller {
function __construct() { function __construct() {
parent::__construct(); parent::__construct();
$this->data['auth_url'] = $this->config->base_url()."authorization/check"; $this->data['auth_url'] = "authorization/check";
$this->view_name = 'authorization/index'; $this->view_name = 'authorization/index';
$this->load->model('userHelper'); $this->load->model('userHelper');
......
...@@ -179,6 +179,13 @@ switch (ENVIRONMENT) ...@@ -179,6 +179,13 @@ switch (ENVIRONMENT)
// $assign_to_config['name_of_config_item'] = 'value of config item'; // $assign_to_config['name_of_config_item'] = 'value of config item';
/**
* Define APP_URL Dynamically
*
* Automatic base url
*/
define('APP_URL', ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http') . "://{$_SERVER['SERVER_NAME']}".str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']));
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
...@@ -312,11 +319,4 @@ switch (ENVIRONMENT) ...@@ -312,11 +319,4 @@ switch (ENVIRONMENT)
* *
* And away we go... * And away we go...
*/ */
require_once BASEPATH.'core/CodeIgniter.php'; require_once BASEPATH.'core/CodeIgniter.php';
\ No newline at end of file
/**
* Define APP_URL Dynamically
*
* Automatic base url
*/
define('APP_URL', ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http') . "://{$_SERVER['SERVER_NAME']}".str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment