title: Firebase Cloud Messaging works only from localhost
body: <p>I have implemented the Firebase Cloud Messaging - Push Notifications to my spring-boot web application. Everything works fine, until I needed to deploy my application to a web server or run it from another domain in my network. Even when I try to open :port instead of localhost:8080, the firebase-messaging is not recognized..</p>
  
  <p>I receive the following error messages in the console:</p>
  
  <blockquote>
    <p>{code: "messaging/unsupported-browser", message: "Messaging: This browser doesn't support the API's …he firebase SDK. (messaging/unsupported-browser).", stack: "FirebaseError: Messaging: This browser doesn't sup…  at <a href="http://192.168.1.3:8080/js/FireBase.js:14:28" rel="nofollow noreferrer">http://192.168.1.3:8080/js/FireBase.js:14:28</a>"}code: "messaging/unsupported-browser"message: "FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser).↵    at Object.messaging (<a href="https://www.gstatic.com/firebasejs/5.7.0/firebase-messaging.js:1:35551" rel="nofollow noreferrer">https://www.gstatic.com/firebasejs/5.7.0/firebase-messaging.js:1:35551</a>)</p>
  </blockquote>
  
  <p>Uncaught ReferenceError: messaging is not defined..</p>
  
  <p>FireBase.js line 14 is:</p>
  
  <pre><code>// Retrieve the FireBase Messaging object.
  const messaging = firebase.messaging();
  </code></pre>
  
  <p>I am searching the whole day about it, but I couldn't find any adequate solution..</p>
  
  <p>I would be very thankful to any suggestions!</p>