4

I'm building a web app which sends web-push. I read this and other articles. https://developers.google.com/web/fundamentals/codelabs/push-notifications/?hl=en

I succeeded to send and receive a push in my development environment.

The problem is: we have to make outgoing request from our app server but almost every port on the app server are closed in the production environment.

We don't have a chance to know the endpoint URL until pushManager.subscribe is done. I think the URL could be changed time by time or user by user. Also it's depends on which browser is used. So we can't tell which port to open.

I tried with my Chrome and Firefox and the endpoint URLs were

https://fcm.googleapis.com/

https://updates.push.services.mozilla.com:443/

but are they always these ones?

Are there any official documents for host/ports to be opened on firewall for web push?

Gabriel M
  • 1,486
  • 4
  • 17
  • 25
  • 1
    I thought server push in HTTP just re-used the same TCP connection the client establishes to make all its HTTP requests, doesn't it? In such a case, you don't need to open a port since both ends are already connected. – Jorge Bellon Sep 10 '18 at 10:06
  • No. This is not server push but web push. Have you read https://developers.google.com/web/fundamentals/codelabs/push-notifications/?hl=en ? App server has to send http post to an endpoint which is specified by push server. – Kuniyoshi Kamimura Sep 11 '18 at 00:22
  • Here's the list of hosts for web push for all major browsers: https://github.com/pushpad/known-push-services That *whitelist* has been used in production for years to connect only to "reliable" hosts / push services. – collimarco Apr 15 '22 at 13:02

0 Answers0