Laravel TestCase not sending Authorization headers (JWT Token)

前端 未结 4 1111
故里飘歌
故里飘歌 2021-01-18 02:46

Summary

We are writing unit tests to test the creation and invalidation of JWT tokens and receiving a \"The token could not be parsed from the reque

4条回答
  •  别那么骄傲
    2021-01-18 03:38

    Apache by default consumes this header. You can fix apache behavior by adding this to your site .conf file:

    # Workaround apache consuming the header.
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
    

提交回复
热议问题