title: HTTPS fails to authorize with JWT. No Authorization header is present in the request
body: <p>I've got an API server based on Yii2 framework. It uses authentication by means of JSON web token. It works fine when I use http, there is an Authorization header provided. To check if the header is present I've made a test method that returns the token.</p>
  
  <pre class="lang-php prettyprint-override"><code>public function actionTest(){
      return Yii::$app-&gt;request-&gt;getHeaders()-&gt;get('Authorization');
  }
  </code></pre>
  
  <p>When I make a request (from Postman) over http, the result is as follows </p>
  
  <blockquote>
    <p>"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvc29mdG1hZXN0cmkuY29tIiwiaWF0IjoxNTcxOTg0NjMzLCJleHAiOjE1NzI1ODk0MzMsInVpZCI6MTAwLCJuYmYiOjE1NzE5ODQ2MzMsImRhdGEiOnsidXNlciI6eyJpZCI6IjEiLCJwYXNzX2hhc2giOiIkUCRCdUtCTmNuUkxRWDdBSFFVMThrQ1ZRYjQxUXZicGIwIn19fQ.zbGk8blRIVRz6h4RLwT7wavH1jFv1cajlKwXYuzAZDE"</p>
  </blockquote>
  
  <p>But once I do the same over https, it returns null.
  I also have an .htaccess file with the following content </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>The API routes that don't require authentication work just fine over https, so it's definitely not a certificate problem or something related.</p>
  
  <p>What am I missing here? Maybe there must be something else added to the htaccess file?</p>