diff --git a/internal/start/start.go b/internal/start/start.go index 91bda92da..f43e2e5b6 100644 --- a/internal/start/start.go +++ b/internal/start/start.go @@ -592,6 +592,7 @@ EOF "DNS_NODES=''", "RLIMIT_NOFILE=", "REALTIME_IP_VERSION=" + string(utils.Config.Realtime.IpVersion), + fmt.Sprintf("MAX_HEADER_LENGTH=%d", utils.Config.Realtime.MaxHeaderLength), }, Cmd: []string{ "/bin/sh", "-c", diff --git a/internal/utils/config.go b/internal/utils/config.go index 139f09a72..7584d6543 100644 --- a/internal/utils/config.go +++ b/internal/utils/config.go @@ -160,7 +160,8 @@ var Config = config{ RootKey: "d4dc5b6d4a1d6a10b2c1e76112c994d65db7cec380572cc1839624d4be3fa275", }, Realtime: realtime{ - IpVersion: AddressIPv6, + IpVersion: AddressIPv6, + MaxHeaderLength: 4096, }, Storage: storage{ Image: StorageImage, @@ -275,8 +276,9 @@ type ( } realtime struct { - Enabled bool `toml:"enabled"` - IpVersion AddressFamily `toml:"ip_version"` + Enabled bool `toml:"enabled"` + IpVersion AddressFamily `toml:"ip_version"` + MaxHeaderLength uint `toml:"max_header_length"` } studio struct { diff --git a/internal/utils/misc.go b/internal/utils/misc.go index 3c963838e..6fb6c91e4 100644 --- a/internal/utils/misc.go +++ b/internal/utils/misc.go @@ -37,7 +37,7 @@ const ( VectorImage = "timberio/vector:0.28.1-alpine" PgbouncerImage = "bitnami/pgbouncer:1.20.1-debian-11-r39" GotrueImage = "supabase/gotrue:v2.125.1" - RealtimeImage = "supabase/realtime:v2.25.35" + RealtimeImage = "supabase/realtime:v2.25.50" StorageImage = "supabase/storage-api:v0.43.11" LogflareImage = "supabase/logflare:1.4.0" // Should be kept in-sync with EdgeRuntimeImage diff --git a/internal/utils/templates/init_config.test.toml b/internal/utils/templates/init_config.test.toml index ff082ff39..e62b55ab9 100644 --- a/internal/utils/templates/init_config.test.toml +++ b/internal/utils/templates/init_config.test.toml @@ -40,6 +40,8 @@ max_client_conn = 100 enabled = true # Bind realtime via either IPv4 or IPv6. (default: IPv6) ip_version = "IPv4" +# The maximum length in bytes of HTTP request headers. (default: 4096) +max_header_length = 8192 [studio] enabled = true diff --git a/internal/utils/templates/init_config.toml b/internal/utils/templates/init_config.toml index a7efab10d..06a5dc755 100644 --- a/internal/utils/templates/init_config.toml +++ b/internal/utils/templates/init_config.toml @@ -40,6 +40,8 @@ max_client_conn = 100 enabled = true # Bind realtime via either IPv4 or IPv6. (default: IPv6) # ip_version = "IPv6" +# The maximum length in bytes of HTTP request headers. (default: 4096) +# max_header_length = 4096 [studio] enabled = true