bump to v 0.3.10, fix image upload on Chrome
This commit is contained in:
@@ -135,8 +135,15 @@ self.addEventListener("notificationclick", (event) => {
|
||||
self.addEventListener("fetch", (event) => {
|
||||
logConsoleAndDb("Service worker got fetch event.", event);
|
||||
|
||||
// Regular requests not related to Web Share Target.
|
||||
if (event.request.method !== "POST") {
|
||||
// Bypass any regular requests not related to Web Share Target
|
||||
// and also requests that are not exactly to the timesafari.app
|
||||
// (because Chrome will send subdomain requests like image-api.timesafari.app through this service worker).
|
||||
if (
|
||||
event.request.method !== "POST" ||
|
||||
(event.request.url.hostname !== "timesafari.app" &&
|
||||
event.request.url.hostname !== "test.timesafari.app" &&
|
||||
event.request.url.hostname !== "localhost")
|
||||
) {
|
||||
event.respondWith(fetch(event.request));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user