Error code:
XMLHttpRequest cannot load https://fcm.googleapis.com/fcm/send. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8081' is therefore not allowed access
Code:
How to set header?