potsky / PimpMyLog

🍭 Log viewer for your web server
http://pimpmylog.com
GNU General Public License v3.0
594 stars 89 forks source link

Chrome - browser notifications #132

Open slaFFik opened 6 years ago

slaFFik commented 6 years ago

I have enabled notifications in Chrome for the domain where Pimp is installed, but PimpMyLog still shows a read message.

image

slaFFik commented 6 years ago

Obviously, notifications are not working

stephen-hill commented 6 years ago

I had the same problem. I solved it by switching to HTTPS.

I found this out by calling Notification.requestPermission(); in the Chrome dev console which reported:

[Deprecation] The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

I've not checked the source code, but I suspect this is the reason why notifications don't work over HTTP.

If this is the case, then the error message should be updated to mention HTTPS.

Cheers Stephen