mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 01:57:20 +00:00
Move serviceworker to workbox and fix SSE interference
Instead of statically hardcoding every frontend asset, this uses a type-based approach to cache all js,css and manifest.json requests. This also fixes the issue that the service worker was interfering with EventSource because it was unconditionally handling all requests which this new implementation doesn't. Fixes: https://github.com/go-gitea/gitea/issues/11092 Fixes: https://github.com/go-gitea/gitea/issues/7372
This commit is contained in:
@ -14,6 +14,7 @@ import initGitGraph from './features/gitgraph.js';
|
||||
import initClipboard from './features/clipboard.js';
|
||||
import initUserHeatmap from './features/userheatmap.js';
|
||||
import initDateTimePicker from './features/datetimepicker.js';
|
||||
import initServiceWorker from './features/serviceworker.js';
|
||||
import attachTribute from './features/tribute.js';
|
||||
import createDropzone from './features/dropzone.js';
|
||||
import highlight from './features/highlight.js';
|
||||
@ -2475,6 +2476,7 @@ $(document).ready(async () => {
|
||||
initGitGraph(),
|
||||
initClipboard(),
|
||||
initUserHeatmap(),
|
||||
initServiceWorker(),
|
||||
]);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user