MatthieuLemoine / push-receiver

A library to subscribe to GCM/FCM and receive notifications within a node process.
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
199 stars 75 forks source link

Cors Error in https://android.clients.google.com/checkin #36

Open LucasFebatis opened 4 years ago

LucasFebatis commented 4 years ago

Hi, I'm getting a cors error when trying to access 'https://android.clients.google.com/checkin' I didn't understand if I need to add localhost to a whitelist to go through Cors or if I need to create my own provisioning server

Error follows

Access to fetch at 'https://android.clients.google.com/checkin' from origin 'http://localhost:8081' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

POST https://android.clients.google.com/checkin net::ERR_FAILED

Request failed : TypeError: Failed to fetch

Retrying in 15 seconds