schn4ck / schnack

🗣️ Simple self-hosted node app for Disqus-like drop-in commenting on static websites
https://schnack.cool/
Other
1.82k stars 84 forks source link

DOMException: The operation is insecure (pushover) #121

Open naufdotal opened 3 years ago

naufdotal commented 3 years ago

Hello, i have added a pushover API in config.js and service run successfully without a problem (schnack in docker). But after i allowed send notification permission when i access my ghost blog and make 2 comments with my twitter and github, its just nothing. No notification made.

404 not found sw.js in my comment-subdomain web -> komentar.nauf.al/sw.js

and i got error on console of my web browser. image

when i browse google, i got this DOMException: The operation is insecure. which is i should add header("Service-Worker-Allowed: https://www.yoursite.com/"); and scope in push.js? is that right?

where should i put it the Service-Worker-Allowed thing? or can you help me to make sure the notifications run in my browser? Thank you

pandelig commented 3 years ago

Hello, did you manage to make any progress regarding the DOMException? i have a similar issue but for the embed.js script instead

bedwardly-down commented 2 years ago

I know this is late but I’m running into a similar issue as both of y’all. What I’m finding so far is that if your url in the config doesn’t match the url of whatever site you’re embedding in (like if you’re running through localhost and a port without reverse proxying out), this exception will show up. I’m not sure how to fix it yet but my guess is it’s related to CORS somehow just not showing the proper error message.