Skip to content

Commit

Permalink
websocket: enable following redirects (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
janthurau authored Mar 24, 2024
1 parent b5b387b commit fd8588a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/provider/src/HocuspocusProviderWebsocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import {
import { retry } from '@lifeomic/attempt'
import * as time from 'lib0/time'
import * as url from 'lib0/url'
import type { MessageEvent } from 'ws'
import { Event } from 'ws'
import { type MessageEvent, Event } from 'ws'
import EventEmitter from './EventEmitter.js'
import { HocuspocusProvider } from './HocuspocusProvider.js'
import {
Expand Down Expand Up @@ -349,7 +348,7 @@ export class HocuspocusProviderWebsocket extends EventEmitter {
this.identifier += 1

// Init the WebSocket connection
const ws = new this.configuration.WebSocketPolyfill(this.url)
const ws = new this.configuration.WebSocketPolyfill(this.url, { followRedirects: true })
ws.binaryType = 'arraybuffer'
ws.identifier = this.identifier

Expand Down

0 comments on commit fd8588a

Please sign in to comment.