mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Make Canvas expressions use socket.io polling only (#29647)
This gets Canvas expressions to behave consistently across environments, and is the first step in migrating expressions to a different transport layer.
This commit is contained in:
parent
1b0f595f01
commit
425dc84058
2 changed files with 5 additions and 2 deletions
|
@ -26,7 +26,7 @@ export async function createSocket(basePath, functionsRegistry) {
|
|||
return new Promise((resolve, reject) => {
|
||||
const socket = io({
|
||||
path: `${basePath}/socket.io`,
|
||||
transports: ['polling', 'websocket'],
|
||||
transports: ['polling'],
|
||||
transportOptions: {
|
||||
polling: {
|
||||
extraHeaders: {
|
||||
|
|
|
@ -46,7 +46,10 @@ export function socketApi(server) {
|
|||
handler: () => 'pong',
|
||||
});
|
||||
|
||||
const io = socket(server.listener, { path: '/socket.io' });
|
||||
const io = socket(server.listener, {
|
||||
path: '/socket.io',
|
||||
transports: ['polling'],
|
||||
});
|
||||
|
||||
io.on('connection', async socket => {
|
||||
// 'request' is the modified hapi request object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue