title: Gatsby-plugin-offline - service worker intercepting form POST requests
body: <p>I have a page setup with gatsby-plugin-offline.</p>
  <p>I finally got everything working offline (documentation is a bit sparse, so this was a bit &quot;trial and error&quot;). But I now have a problem I cannot seem to be able to solve.</p>
  <p>My POST requests to Netlify for my contact form is intercepted by the serviceworker. I really do not need any offline-functionality here - I simple &quot;swap&quot; the &quot;send&quot; button in my form for a &quot;network offline&quot; message when users are offline. However, when the page is online the serviceworker still kicks in.</p>
  <p>I guess I have to to make some sort of alternative routing for POST requests, but I am not sure how to solve this?</p>
  <p>So far this is my setup in gatsby-plugin-offline that works as intended:</p>
  <pre><code>{
        resolve: &quot;gatsby-plugin-offline&quot;,
        options: {
          precachePages: [
            `/index.html`,
            `/en/artikler/*`,
            `/en/artikler/*/*`,
            `/en/`,
            `/artikler/*`,
            `/artikler/*/*`,
            `/webudvikling/*`,
            `/en/webudvikling/*`,
            `/grafik/*`,
            `/en/grafik/*`,
            `/kompetencer/*`,
            `/en/kompetencer/*`,
          ],
          workboxConfig: {
            globPatterns: [
              &quot;**/*{.html,.webp,.webmanifest,.woff,.woff2,.ttf,.eot,.css,.svg,.mp3,icons/icon*,.ico, sw.js}&quot;,
            ],
          },
        },
      },
  </code></pre>
  <p>Documentation for the plugin implies the possibility to append a script to the serviceworker by adding a line under options:</p>
  <pre><code>appendScript: require.resolve(`./src/custom-sw-code.js`),
  </code></pre>
  <p>My idea is then to add something like:</p>
  <pre><code>workbox.routing.registerRoute(
        /\$?????????/,
        workbox.strategies.networkFirst(),
      )
  </code></pre>
  <p>But I am not sure? Can you somehow filter by event.request.method === 'POST'or similar to force any POST requests to Network only?</p>