_rubenfa

_rubenfa

Websocket 426 Error, with LiveView

Hi,

I have developed some things with LiveView. All is working on my machine (how many times I would have said that …), and also on the test server. The problem is that it is not working on the production server. If I open Firefox’s developer tools, I can see an error message:

Firefox can’t establish a connection to the server at wss://mydomain.com/live/websocket?vsn=2.0.0

And after that, an HTTP failed request with code 426 Upgrade Required.

Do you know what am I doing wrong?

Thanks in advance.

Most Liked

idi527

idi527

:waving_hand:

Is your production box behind a load balancer / reverse proxy of any kind? Maybe it doesn’t allow upgrade requests through, then cowboy would respond with 426 probably, since it expects one. But that’s just speculation.

_rubenfa

_rubenfa

Never mind. I find out that there is a Caddy reverse proxy configured. After configuring it with proper WebSockets configuration, all is working fine.

Thanks for your help.

Where Next?

Popular in Questions Top

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New

Other popular topics Top

New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31525 112
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement