From 655def514116f67a11986a3dd6edd768e9ac9447 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 22 May 2020 17:46:39 +0200 Subject: Move serviceworker to workbox and fix SSE interference (#11538) (#11547) * 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 * rethrow error instead of logging * await .register * Revert "rethrow error instead of logging" This reverts commit 043162ba1f18b98a4bf9635959fd28d16e839fc5. * improve comment * remove JSRenderer * add version-based cache invalidation * refactor * more refactor * remove comment * rename item to fit cache name Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> --- .eslintrc | 1 + 1 file changed, 1 insertion(+) (limited to '.eslintrc') diff --git a/.eslintrc b/.eslintrc index 8f337baec5..3a731cbf6b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -48,6 +48,7 @@ rules: no-cond-assign: [2, except-parens] no-console: [1, {allow: [info, warn, error]}] no-continue: [0] + no-empty: [2, {allowEmptyCatch: true}] no-eq-null: [2] no-mixed-operators: [0] no-multi-assign: [0] -- cgit v1.2.3