Server Sent Events - https does not work: net::ERR_HTTP2_PROTOCOL_ERROR

Whole thing works well over https when I use a real domain and a valid certificate. The issue seems to be there only with localhost.

I am still trying to figure out how to make it work over localhost using https.