mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-13 02:28:50 -05:00
Safari fix for TLS connections in puter
This commit is contained in:
committed by
Neal Shah
parent
5b09dbb1f5
commit
82732b9e96
@@ -11,6 +11,10 @@ export class PTLSSocket extends PSocket {
|
||||
super(...args);
|
||||
super.on("open", (async() => {
|
||||
if (!rustls) {
|
||||
// Safari exists unfortunately without good ReadableStream support. Until that is fixed we need this.
|
||||
if (!globalThis.ReadableByteStreamController) {
|
||||
await import( /* webpackIgnore: true */ "https://unpkg.com/web-streams-polyfill@3.0.2/dist/polyfill.js");
|
||||
}
|
||||
rustls = (await import( /* webpackIgnore: true */ "https://puter-net.b-cdn.net/rustls.js"))
|
||||
await rustls.default("https://puter-net.b-cdn.net/rustls.wasm")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user