Add extra header options to socket io request
This commit is contained in:
parent
e98116c290
commit
fdb5d8c458
@ -58,7 +58,14 @@ class Session extends EventEmitter {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.socket = io(process.env.REACT_APP_BROKER_URL, {
|
this.socket = io(process.env.REACT_APP_BROKER_URL, {
|
||||||
transports: ["websocket"],
|
transports: ["polling", "websocket"],
|
||||||
|
transportOptions: {
|
||||||
|
polling: {
|
||||||
|
extraHeaders: {
|
||||||
|
"Cookie":"session-persist"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.socket.on(
|
this.socket.on(
|
||||||
|
Loading…
Reference in New Issue
Block a user