JWT Authorization header not reaching api

后端 未结 1 454
[愿得一人]
[愿得一人] 2021-01-25 12:32

I deployed my laravel project on a shared hosting server that supports mod_rewrite and want to send a header called Authorization (JWT header) but it wont reach the controller.<

相关标签:
1条回答
  • 2021-01-25 12:44

    To evade Apache2 discards the authorization header I needed to add this code:

    RewriteEngine On
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
    

    To my .htcaccess file in my /public folder.

    0 讨论(0)
提交回复
热议问题