Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Only works with VPN #100

Open
Ahmadheysami opened this issue Mar 9, 2023 · 7 comments
Open

Only works with VPN #100

Ahmadheysami opened this issue Mar 9, 2023 · 7 comments

Comments

@Ahmadheysami
Copy link

Hello, I used this module and unfortunately it only works with VPN and otherwise it fails.

Is there a solution?

@kevinmarrec
Copy link
Owner

Hi @Ahmadheysami

What's exactly happening when not using VPN ? Is your network preventing access to google URLs ?

options.workboxUrl = `https://storage.googleapis.com/workbox-cdn/releases/${options.workboxVersion}/workbox-sw.js`

If it does, you may try to host yourself the google Workbox script somewhere and use workboxUrl option to point to the self-hosted script.

@Ahmadheysami
Copy link
Author

Probably because I am in Iran, I do not have access to Google services

Can you make a way for my situation?

I would be very grateful if you could

@kevinmarrec
Copy link
Owner

I don't know if self-hosting the script somewhere would work, I would be afraid it internally relies on fetch calls on other google services inside. I will need to check !

@Ali-Nasir-01
Copy link

Ali-Nasir-01 commented Mar 18, 2023

Hey @Ahmadheysami
I think you can use other workboxes CDN like https://cdn.jsdelivr.net/npm/workbox-cdn/workbox/workbox-sw.js

You can add it by option like the below example on nuxtConfig
workbox: { enabled: true, workboxUrl: "https://cdn.jsdelivr.net/npm/workbox-cdn/workbox/workbox-sw.js" }
And for more information, you can read this.

It works for me

@Ahmadheysami
Copy link
Author

Thank you Ali

If it worked for you. So it definitely works for me
Thanks again for your help
I will definitely try

@kevinmarrec
Copy link
Owner

The only issue here is that the workbox-cdn is using Workbox v5, we would need to update it to v6.

@Ali-Nasir-01
Copy link

Ali-Nasir-01 commented Mar 27, 2023

@kevinmarrec Feel free to close the issue because in Iran we can't use google URLs. we fix this problem by using other CDNs and It's not about v5 or v6 at all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants