Getting token_not_provided when using Authorization Header with JWT Laravel

前端 未结 1 1762
不知归路
不知归路 2021-01-14 18:58

I read this tutorial and I managed to make it work perfectly. The only problem is that when I switch from ?token={token_here} to Authorization Beare

相关标签:
1条回答
  • 2021-01-14 19:58

    As it turns out, the problem was that the header configuration in the .htaccess file was missing a * in both lines. Instead of

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

    it show be

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

    Special Thanks to James-Daddies.

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