tpeczek/Demo.AspNetCore.PushNotifications

hi , how set ip valid for worker ?

Closed this issue · 6 comments

Hi @MajidSafari,

I'm not sure if I've understood the question. Can you elaborate a bit more?

hi , @tpeczek

i want PushNotifications run in my server when "applicationUrl": "http://localhost:13518/"

change localhost to my ip server but

Service Workers are not supported

All URLs inside the application are relative, so the URL under which application runs has no impact. Service Workers are not limited by localhost or even secure context, so if you are receiving message that they are not supported, the most likely cause is that you are using browser which doesn't support them.

In general I only got one response from that URL and then it started to time out.

Now to put more details regardign why you might get Service Workers are not supported. Most browsers require HTTPS to allow Service Workers, but they also have exception for localhost to make development easy (but it has to be exactly localhost, not an IP or custom domain). Sometimes you can configure browser to treat a custom HTTP domain as secure. For example in Chrome you can go to chrome://flags/#unsafely-treat-insecure-origin-as-secure and add you domain.

In other words, you either need to use localhost, or HTTPS, or configure your browser to accept an insecure domain.

tnxxxxxxxxxxxxxxxxxxx