title: SSE not working as expected on Heroku
body: <p>It is the first time for me working with <strong>Server Sent Events</strong> and probably I'm doing something wrong... I just followed a few guides and doing code experiments and locally everything seems to work fine.</p>
  
  <p>Unfortunately when I upload the app on <strong>Heroku</strong> it doesn't work as expected.</p>
  
  <p>The Javascript looks like this:</p>
  
  <pre><code>// SSE Start
  // Check if SSE is supported
  if (!!window.EventSource) {
    var source = new EventSource('/live/redis');
  } else {
    console.log('SSE not supported');
  }
  
  source.addEventListener('open', function (e) {
    console.log('Connection Open');
  }, false);
  </code></pre>
  
  <p>I'm using <strong>NodeJS</strong> and <strong>Redis</strong> to get real time messages from the API, but it doesn't matter...</p>
  
  <p>When the <strong>SSE</strong> connection is open I just print a log on the browser.</p>
  
  <p>I do nothing else at moment and if I open my app locally it just work fine and I receive the <code>console.log</code> message.</p>
  
  <p>If I push the project on Heroku I don't receive any open connection message.</p>
  
  <p>I can not understand why, probably something is missing or probably do I need to configure Heroku to support SSE?</p>
  
  <p>If I open the project with the command <code>heroku local</code> it works fine as well...</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>From the Heroku logs I receive this:</p>
  
  <p><code>app/web.1:  GET /live/redis 500 86.403 ms - -</code></p>
  
  <p>I can not understand why, locally it is working fine, on Heroku it isn't.</p>