hanford / next-offline

make your Next.js application work offline using service workers via Google's workbox
https://github.com/hanford/next-offline
1.59k stars 111 forks source link

Authorization header is not getting passed by service-worker #277

Open pawanmeena opened 3 years ago

pawanmeena commented 3 years ago
workboxOpts: {
    runtimeCaching: [
      {
        urlPattern: /api/,
        handler: 'NetworkFirst',
        options: {
          cacheableResponse: {
            statuses: [0, 200],
            headers: {
              'x-test': 'true',
              "credentials": "include"
            }
          }
        }
      }
    ]
  },

Next js -> 10.0.9 next-offline -> 5.0.2

We want to pass authorization header. Which is not working with our current implementation