Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Fix custom runtimeCaching rules, default runtimeCaching rule order (#3685)

mahmed20007c0b8362a463
diff --git a/web/next.config.js b/web/next.config.js
index f7cb8ce005..8d95f37668 100644
--- a/web/next.config.js
+++ b/web/next.config.js
@@ -8,19 +8,22 @@ const runtimeCaching = require('next-pwa/cache');
const withPWA = require('next-pwa')({
dest: 'public',
runtimeCaching: [
- ...runtimeCaching,
{
urlPattern: /\.(?:ts|m3u8)$/i,
handler: 'NetworkOnly',
},
{
- urlPattern: /^\/admin\/.*$/,
+ urlPattern: (url) => { return url.pathname.startsWith("/admin/"); },
handler: 'NetworkOnly',
+ options: {
+ fetchOptions: { credentials: 'same-origin' }
+ }
},
{
- urlPattern: /^\/api\/.*$/,
+ urlPattern: (url) => { return url.pathname.startsWith("/api/"); },
handler: 'NetworkOnly',
},
+ ...runtimeCaching,
],
register: true,
skipWaiting: true,