EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
Event source is working on apache srever. But When I am switching to nginx, it says
EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
I am using PHP and laravel and chrome browser.
I have added
header('Content-Type: text/event-stream');
header('Cache-Control: no-cache');
before the response from server.
What do you see if you open that URL in your browser?
I am getting the below response on console of chrome.
EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
Getting same issue. Have you resolved it?
I have same on IE9. But on other browsers work fine, weird.
@lmkoushik , @abzfarah , @Jurigag , are you sure the response is correct?