Fill in the gaps to set server-sent events headers.
Server-sent Events
Server-Sent Events headers
Report a typo
Fill in the gaps with the relevant elements
if (req.url === '/events') {
res.writeHead(200, {
'Content-Type': '',
'Cache-Control': '',
'Connection': '',
'Access-Control-Allow-Origin': '*' // Any domain can access this endpoint
});
}Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.