Skip to content

Commit

Permalink
local environment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fadilxcoder committed Aug 8, 2020
1 parent 5d9a9d3 commit b7336fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

# Setting variables for application
## development
## testing
## production

<IfModule mod_env.c>
SetEnv CI_ENV development
</IfModule>
2 changes: 1 addition & 1 deletion application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = '';
$config['base_url'] = 'http://localhost/ci-jwt-api/';

/*
|--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/Welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public function generateToken()
# GET Request with Authorization header
public function verifyToken()
{
$received_Token = $this->input->request_headers('Authorization');
$header = $received_Token['Authorization'];
$received_Token = $this->input->request_headers('Authorization');
$header = $received_Token['authorization'];
$auth = explode(' ', $header);
$type = $auth[0];
$token = $auth[1];
Expand Down

0 comments on commit b7336fe

Please sign in to comment.