Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dinesh_raj's avatar

Issue with web services

Recently I am facing one issue with laravel 5.2 Actually, my project is setup on shared hosting server, I am using larval 5.2 for web services but I can't able to pass token with a header, the same code is working fine with 4.2 And the same code is working fine on any dedicated server, From my first R&D I found that I can't able to pass information in the header if my SERVER ["HTTP_CONNECTION"] is 'Off' once I change it to KeepAlive On everything is working good. Can anyone help me on this. ?

0 likes
2 replies
dinesh_raj's avatar

Finally i got it use below code in your .htaccess file

Handle Authorization Header

RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Please or to participate in this conversation.