Skip to content

Configurations

The application's default behaviour can be altered with configuration settings. This document provides a quick overview about it.

Auto-Delete Duration

By default, data is deleted within 2 hours in Redis. This can be updated by making the below changes.
In the src/config.toml file, update the value for auto_delete_duration

toml
[data]
# Format: <number><unit>
# Units: s=seconds, m=minutes, h=hours, d=days
# Examples: "50s" for 50 seconds, "5m" for 5 minutes, "2h" for 2 hours, "7d" for 7 days
auto_delete_duration = "2h"

Websocket Max Message Size

QuickRetro uses Websockets for communication. This configuration setting controls the max allowed size in bytes for all data sent through the websocket.

In the src/config.toml file, update the value for max_message_size_bytes

toml
[websocket]
# Maximum message size (in bytes) allowed from peer for the websocket connection
# For the front-end validation, keep the same value in (src/frontend/.env [VITE_MAX_WEBSOCKET_MESSAGE_SIZE_BYTES])
max_message_size_bytes = 1024

This setting is defined separately for the backend and frontend. For the frontend, this is defined in src/frontend/.env.
Update the value for VITE_MAX_WEBSOCKET_MESSAGE_SIZE_BYTES

ini
VITE_WS_PROTOCOL=wss
VITE_SHOW_CONSOLE_LOGS=false
# Triggers message size validation.
# It is recommended to keep the same value as what's allowed in backend server (defined in src/config.toml [websocket].max_message_size_bytes).
# To avoid message size validation, comment out below line. However, this will break the server websocket connection when the limit is breached.
VITE_MAX_WEBSOCKET_MESSAGE_SIZE_BYTES=1024

IMPORTANT

Ensure the config values are same for both frontend and backend

TIP

VITE_MAX_WEBSOCKET_MESSAGE_SIZE_BYTES also causes UI validation to run everytime a User type's or paste's text.
Commenting it out will stop the validation from being run everytime.
It is not recommended to comment out this config, unless its causing issues for users.

Allowed Origins

Update the allowed_origins config setting in src/config.toml to add some degree of protection to the websocket connection.
You will typically update this setting when self-hosting.

toml
[server]
# When self-hosting, add your domain to allowed_origins list. 
# For e.g. if you are hosting your site at https://example.com, allowed_origins will look like -
# allowed_origins = [
#     "https://example.com"
# ]
allowed_origins = [
    "http://localhost:8080",
    "https://localhost:8080",
    "http://localhost:5173",
    "https://localhost",
    "https://quickretro.app",
    "https://demo.quickretro.app"
]

Connecting to Redis

The Go app always attempts to connect to Redis when its starts. It errors out if connecting to Redis fails. The app looks for an ENV variable named REDIS_CONNSTR for the connection details.

The Redis ACL username and password can be passed as part of the url to REDIS_CONNSTR.

Released under the MIT License