Skip to content

Commit eeba306

Browse files
authored
feat: disable UTF8 validation on websocket frames (#1532)
Currently all text frames as handled only with JSON which already requires UTF-8
1 parent a17ce3e commit eeba306

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/realtime_web/endpoint.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ defmodule RealtimeWeb.Endpoint do
2222
# the number of times Cowboy need to request more packets from the port driver at
2323
# the expense of potentially higher memory being used.
2424
active_n: 100,
25+
# Skip validating UTF8 for faster frame processing.
26+
# Currently all text frames as handled only with JSON which already requires UTF-8
27+
validate_utf8: false,
2528
serializer: [
2629
{Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
2730
{Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Realtime.MixProject do
44
def project do
55
[
66
app: :realtime,
7-
version: "2.47.4",
7+
version: "2.48.0",
88
elixir: "~> 1.17.3",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,

0 commit comments

Comments
 (0)