Skip to content

Commit

Permalink
don't cache produce eventsource
Browse files Browse the repository at this point in the history
  • Loading branch information
Zemke committed Nov 19, 2023
1 parent 364d201 commit 8ba777f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cwt-angular/src/main/webapp/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ self.addEventListener('fetch', (event) => {
const pathname = new URL(event.request.url).pathname;
if (event.request.method === "GET"
&& pathname !== "/api/message/listen"
&& !pathname.endsWith("/stats-listen")) {
&& !pathname.endsWith("/stats-listen")
&& !pathname.endsWith("/produce")) {
event.respondWith(caches.open(CACHE).then((cache) => {
return fetch(event.request).then((fetchedResponse) => {
cache.put(event.request, fetchedResponse.clone());
Expand Down

0 comments on commit 8ba777f

Please sign in to comment.