tastyigniter / ti-ext-api

Manages and generates RESTful APIs for TastyIgniter
MIT License
17 stars 22 forks source link

Authorization header was empty and caused the error ""No valid API token provided" #88

Open APEX-BVI opened 10 months ago

APEX-BVI commented 10 months ago

What happened?

Based on the documentation user running TI on apache should add this to their .htaccess file RewriteCond %{HTTP:Authorization} ^(.) RewriteRule . - [e=HTTP_AUTHORIZATION:%1]

But these lines should be also added to the virtual host

What did you expect to happen?

I added the following to the Virtual Server

Handle Authorization Header

<IfModule mod_headers.c>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule> 

An now the Authorization header is available on my server

Version

3.x

What browser are you seeing the problem on?

No response

Relevant log output

No response