title: Reading request headers inside a service worker
body: <p>I've created a very basic service worker, that logs the request headers on <code>fetch</code> event:</p>
  
  <pre><code>self.addEventListener('fetch', event =&gt; {
    console.log("- Fetch -");
    for (const pair of event.request.headers.entries()) {
      console.log(pair[0]+ ': '+ pair[1]);
    }
  });
  </code></pre>
  
  <p>On the main page, I'm fetching the same page like so:</p>
  
  <pre><code>function fetchPage() {
     fetch(location.href);
  }
  </code></pre>
  
  <p>When logging the headers I'm getting just the following 2 headers:</p>
  
  <pre><code>- Fetch -
  service-worker.js:12 accept: */*
  service-worker.js:12 user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
  </code></pre>
  
  <p>Why can't I see any other/custom headers?<br>
  Is it a security limitation? </p>