Skip to content

Fix Realtime Bug By Overriding MAX_HEADER_LENGTH in config.toml for Realtime #1784

@ghost

Description

Describe the bug
Supabase Realtime has a bug where, if certain authentication providers (in my case, Keycloak) are used with SSR, the cookies are larger than the default length of 4096 allowed by Elixir (powering Realtime). This bug has been fixed in the Realtime package itself (see supabase/realtime#761 and supabase/realtime#762), via an environment variable MAX_HEADER_LENGTH which defaults to 4096 if unspecified (leaving existing behavior unchanged) but can be increased as needed.

This solves the problem when running supabase manually, such as in a production environment using docker-compose.yml. However, there does not seem to be a way to set MAX_HEADER_LENGTH for the realtime container using the Supabase CLI / in the config.toml file to fix the issue for local development.

Expected behavior
Perhaps a section in config.toml for realtime and the ability to set a value like max_header_length that would, in turn, properly configure the environment variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions