Skip to content

Commit

Permalink
removed scope
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesoroka committed Oct 5, 2024
1 parent 3a53c6b commit 4b17898
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ const stored_token = localStorage.getItem("token");
const token = keycloak.token ? keycloak.token : stored_token;

const base_url = import.meta.env.PROD ? "/search/worker.js" : "/worker.js";
const reg_scope = import.meta.env.PROD ? "{ scope: '/search/' }" : null;

console.log("base url", base_url);

if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker
.register(base_url, reg_scope)
.register(base_url)
.then((registration) => {
console.log(
"Service Worker registered with scope: ",
Expand Down

0 comments on commit 4b17898

Please sign in to comment.