title: How to check JsonWebToken (JWT) in Headers?
body: <p>I have a middleware to protect a route. And I am checking whether the token is present in headers or not??</p>
  <pre><code>if(req.headers.authorization &amp;&amp; req.headers.authorization.startsWith('Bearer')){
          token = req.headers.authorization.split(&quot; &quot;)[1]
      }
  </code></pre>
  <p>*<strong>My Question is</strong> is it necessary to add something like already did in above code by adding <strong>Bearer</strong>? is it something that enhance token presence checking or it is just a way.
  i think this way should also work</p>
  <pre><code>if(req.headers.authorization){
          token = req.headers.authorization
      }
  </code></pre>
  <p>What will be the difference between these two?</p>