I want to setup push notification on a web app, but I want to test it first on my local dev server (which is set with vagrant) so my local server looks something like htttp://mylocalserver.com. (I want to point out that it's really hard to change it to 127.0.0.1 because this vagrant box was made by someone else and there are also other stuff that makes it complicated to change it)
The first issue I encountered was
"Service Worker Error DOMException: Only secure origins are allowed " which i solved using the solution in "unsafely-treat-insecure-origin-as-secure" flag is not working on Chrome
But then I realized i can't use any of the Notification methods like: Notification.permission or Notification.requestPermission.
When I try to get the Notification.permission it returns "undefined". Is there a way i can make this functionality work?