Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Safari can't connect to secure laravel websocket #906

Closed
Sairahcaz opened this issue Dec 28, 2021 · 0 comments
Closed

Safari can't connect to secure laravel websocket #906

Sairahcaz opened this issue Dec 28, 2021 · 0 comments

Comments

@Sairahcaz
Copy link

I already asked this question on stackoverflow, but nobody answered:
https://stackoverflow.com/questions/70464828/safari-cant-connect-to-secure-laravel-websocket

So maybe here somebody can help me?:

I'm running an app, where I use laravel-websockets, with the pusher replacement and a self created websocket instance. For SSL I used a letsencrypt certificate and the nginx reverse proxy "Same location for websockets and web contents" approach. On my nginx TLS 1.2 and 1.3 is enabled. Now on Firefox and Chrome all is working fine, but on Safari (version 14.1.2, tested on a macOS Mojave 10.14.6) I get the following error in the console:

WebSocket connection to 'wss://example.com/app/asdfasdf?protocol=7&client=js&version=7.0.3&flash=false' failed: Unexpected response code: 401

These are my echo options:

const echoOptions = {
  broadcaster: 'pusher',
  key: process.env.MIX_PUSHER_APP_KEY,
  cluster: process.env.MIX_PUSHER_APP_CLUSTER,
  wsHost: window.location.hostname,
  wsPort: 80,
  wssPort: 443,
  forceTLS: true,
  enabledTransports: ['ws', 'wss'], // <-- disable pusher api fallback
  disableStats: true,
};

window.Echo = new Echo(echoOptions);

I searched a lot for any kind of similar issues, but I can't find an answer.

Any ideas or help would be awesome!

@beyondcode beyondcode locked and limited conversation to collaborators Jan 5, 2022
@mpociot mpociot converted this issue into discussion #911 Jan 5, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant