2013-12-20 13:17:21 +08:00
|
|
|
#
|
|
|
|
# DO NOT EDIT THIS FILE
|
|
|
|
# If you need to make changes create a file called discourse.conf in this directory with your changes
|
2014-06-04 06:38:10 +08:00
|
|
|
# On import this file will be imported using ERB
|
2013-12-20 15:01:41 +08:00
|
|
|
#
|
2013-12-20 13:17:21 +08:00
|
|
|
|
|
|
|
# Discourse supports multiple mechanisms for production config.
|
|
|
|
#
|
|
|
|
# 1. You can do nothing and get these defaults (not recommended, you should at least set hostname)
|
|
|
|
# 2. You can copy this file to config/discourse.conf and amend with your settings
|
|
|
|
# 3. You can pass in config from your environment, all the settings below are available.
|
2013-12-20 15:01:41 +08:00
|
|
|
# Append DISCOURSE_ and upper case the setting in ENV. For example:
|
2023-08-02 03:17:43 +08:00
|
|
|
# to pass in db_pool of 200 you would use DISCOURSE_DB_POOL=200
|
2013-12-20 13:17:21 +08:00
|
|
|
|
|
|
|
# All settings apply to production only
|
|
|
|
|
2014-05-22 07:00:24 +08:00
|
|
|
# connection pool size, sidekiq is set to 5, allowing an extra 3 for bg threads
|
|
|
|
db_pool = 8
|
2013-12-20 13:17:21 +08:00
|
|
|
|
2017-10-17 12:34:49 +08:00
|
|
|
# Database connection timeout in seconds
|
2017-10-17 12:32:41 +08:00
|
|
|
db_connect_timeout = 5
|
|
|
|
|
2013-12-20 13:17:21 +08:00
|
|
|
# socket file used to access db
|
2013-12-20 13:23:01 +08:00
|
|
|
db_socket =
|
2013-12-20 13:17:21 +08:00
|
|
|
|
|
|
|
# host address for db server
|
2014-01-06 09:25:29 +08:00
|
|
|
# This is set to blank so it tries to use sockets first
|
|
|
|
db_host =
|
2013-12-20 13:17:21 +08:00
|
|
|
|
2018-03-09 10:22:29 +08:00
|
|
|
# host address for db server when taking a backup via `pg_dump`
|
|
|
|
# Defaults to `db_host` if not configured
|
|
|
|
db_backup_host =
|
|
|
|
|
2014-01-06 09:25:29 +08:00
|
|
|
# port running db server, no need to set it
|
|
|
|
db_port =
|
2013-12-20 13:17:21 +08:00
|
|
|
|
2018-03-09 10:22:29 +08:00
|
|
|
# db server port to use when taking a backup via `pg_dump`
|
2024-01-19 03:25:32 +08:00
|
|
|
db_backup_port =
|
2018-03-09 10:22:29 +08:00
|
|
|
|
2013-12-20 13:17:21 +08:00
|
|
|
# database name running discourse
|
|
|
|
db_name = discourse
|
|
|
|
|
|
|
|
# username accessing database
|
|
|
|
db_username = discourse
|
|
|
|
|
|
|
|
# password used to access the db
|
|
|
|
db_password =
|
|
|
|
|
2015-10-19 11:02:22 +08:00
|
|
|
# Disallow prepared statements
|
|
|
|
# see: https://github.com/rails/rails/issues/21992
|
|
|
|
db_prepared_statements = false
|
2015-02-18 08:16:53 +08:00
|
|
|
|
2016-01-25 14:27:59 +08:00
|
|
|
# host address for db replica server
|
|
|
|
db_replica_host =
|
|
|
|
|
|
|
|
# port running replica db server, defaults to 5432 if not set
|
|
|
|
db_replica_port =
|
|
|
|
|
2020-06-15 14:33:30 +08:00
|
|
|
db_advisory_locks = true
|
|
|
|
|
2013-12-20 13:17:21 +08:00
|
|
|
# hostname running the forum
|
|
|
|
hostname = "www.example.com"
|
|
|
|
|
2015-07-23 13:33:38 +08:00
|
|
|
# backup hostname mainly for cdn use
|
|
|
|
backup_hostname =
|
2015-07-23 13:22:54 +08:00
|
|
|
|
2013-12-20 13:17:21 +08:00
|
|
|
# address of smtp server used to send emails
|
|
|
|
smtp_address =
|
|
|
|
|
|
|
|
# port of smtp server used to send emails
|
|
|
|
smtp_port = 25
|
|
|
|
|
|
|
|
# domain passed to smtp server
|
|
|
|
smtp_domain =
|
|
|
|
|
|
|
|
# username for smtp server
|
|
|
|
smtp_user_name =
|
|
|
|
|
|
|
|
# password for smtp server
|
|
|
|
smtp_password =
|
|
|
|
|
2014-01-06 20:49:42 +08:00
|
|
|
# smtp authentication mechanism
|
|
|
|
smtp_authentication = plain
|
|
|
|
|
2013-12-20 13:17:21 +08:00
|
|
|
# enable TLS encryption for smtp connections
|
|
|
|
smtp_enable_start_tls = true
|
|
|
|
|
2014-05-08 05:59:05 +08:00
|
|
|
# mode for verifying smtp server certificates
|
|
|
|
# to disable, set to 'none'
|
|
|
|
smtp_openssl_verify_mode =
|
|
|
|
|
2021-01-19 00:56:18 +08:00
|
|
|
# force implicit TLS as per RFC 8314 3.3
|
|
|
|
smtp_force_tls = false
|
|
|
|
|
2022-08-16 00:45:23 +08:00
|
|
|
# number of seconds to wait while attempting to open a SMTP connection
|
|
|
|
smtp_open_timeout = 5
|
|
|
|
|
|
|
|
# Number of seconds to wait until timing-out a SMTP read(2) call
|
2024-02-21 05:13:18 +08:00
|
|
|
smtp_read_timeout = 30
|
2022-08-16 00:45:23 +08:00
|
|
|
|
2023-11-28 13:32:59 +08:00
|
|
|
# number of seconds to wait while attempting to open a SMTP connection only when
|
|
|
|
# sending emails via group SMTP
|
|
|
|
group_smtp_open_timeout = 30
|
|
|
|
|
|
|
|
# Number of seconds to wait until timing-out a SMTP read(2) call only when sending
|
|
|
|
# emails via group SMTP
|
|
|
|
group_smtp_read_timeout = 60
|
|
|
|
|
2014-07-17 06:34:30 +08:00
|
|
|
# load MiniProfiler in production, to be used by developers
|
|
|
|
load_mini_profiler = true
|
2013-12-20 13:17:21 +08:00
|
|
|
|
2020-09-17 23:18:35 +08:00
|
|
|
# Every how many requests should MP profile a request (aka take snapshot)
|
|
|
|
# Default is never
|
|
|
|
mini_profiler_snapshots_period = 0
|
|
|
|
|
2020-10-22 00:37:28 +08:00
|
|
|
# specify the URL of the destination that MiniProfiler should ship snapshots to
|
|
|
|
# mini_profiler_snapshots_transport_auth_key is required as well
|
|
|
|
mini_profiler_snapshots_transport_url =
|
|
|
|
|
|
|
|
# authorization key that will be included as a header in requests made by the
|
|
|
|
# snapshots transporter to the URL specified above. The destination should
|
|
|
|
# know this key and only accept requests that have this key in the
|
|
|
|
# `Mini-Profiler-Transport-Auth` header.
|
|
|
|
mini_profiler_snapshots_transport_auth_key =
|
|
|
|
|
2013-12-20 13:17:21 +08:00
|
|
|
# recommended, cdn used to access assets
|
|
|
|
cdn_url =
|
|
|
|
|
2020-05-12 23:34:12 +08:00
|
|
|
# The hostname used by the CDN to request assets
|
|
|
|
cdn_origin_hostname =
|
|
|
|
|
2014-02-10 15:11:52 +08:00
|
|
|
# comma delimited list of emails that have developer level access
|
2013-12-20 13:17:21 +08:00
|
|
|
developer_emails =
|
|
|
|
|
|
|
|
# redis server address
|
|
|
|
redis_host = localhost
|
|
|
|
|
|
|
|
# redis server port
|
|
|
|
redis_port = 6379
|
|
|
|
|
2020-12-23 10:14:19 +08:00
|
|
|
# redis replica server address
|
|
|
|
redis_replica_host =
|
2016-03-02 22:01:48 +08:00
|
|
|
|
2020-12-23 10:14:19 +08:00
|
|
|
# redis replica server port
|
|
|
|
redis_replica_port = 6379
|
2016-03-02 22:01:48 +08:00
|
|
|
|
2013-12-31 05:39:43 +08:00
|
|
|
# redis database
|
|
|
|
redis_db = 0
|
|
|
|
|
2013-12-20 13:17:21 +08:00
|
|
|
# redis password
|
|
|
|
redis_password =
|
2014-02-10 15:11:52 +08:00
|
|
|
|
2019-01-04 12:08:22 +08:00
|
|
|
# skip configuring client id for cloud providers who support no client commands
|
|
|
|
redis_skip_client_commands = false
|
2015-06-25 14:51:48 +08:00
|
|
|
|
2020-03-06 06:21:38 +08:00
|
|
|
# uses SSL for all Redis connections if true
|
|
|
|
redis_use_ssl = false
|
|
|
|
|
2019-05-28 13:52:43 +08:00
|
|
|
# message bus redis server switch
|
|
|
|
message_bus_redis_enabled = false
|
|
|
|
|
|
|
|
# message bus redis server address
|
|
|
|
message_bus_redis_host = localhost
|
|
|
|
|
|
|
|
# message bus redis server port
|
|
|
|
message_bus_redis_port = 6379
|
|
|
|
|
2020-12-23 10:14:19 +08:00
|
|
|
# message bus redis replica server address
|
|
|
|
message_bus_redis_replica_host =
|
2019-05-28 13:52:43 +08:00
|
|
|
|
|
|
|
# message bus redis slave server port
|
2020-12-23 10:14:19 +08:00
|
|
|
message_bus_redis_replica_port = 6379
|
2019-05-28 13:52:43 +08:00
|
|
|
|
|
|
|
# message bus redis database
|
|
|
|
message_bus_redis_db = 0
|
|
|
|
|
|
|
|
# message bus redis password
|
|
|
|
message_bus_redis_password =
|
|
|
|
|
|
|
|
# skip configuring client id for cloud providers who support no client commands
|
|
|
|
message_bus_redis_skip_client_commands = false
|
|
|
|
|
2014-02-10 15:11:52 +08:00
|
|
|
# enable Cross-origin Resource Sharing (CORS) directly at the application level
|
|
|
|
enable_cors = false
|
2011-10-16 02:00:00 +08:00
|
|
|
cors_origin = ''
|
2014-02-17 07:43:57 +08:00
|
|
|
|
2021-05-21 09:43:47 +08:00
|
|
|
# enable if you really need to serve assets in prod
|
2014-02-17 07:43:57 +08:00
|
|
|
serve_static_assets = false
|
2014-05-14 08:21:11 +08:00
|
|
|
|
|
|
|
# number of sidekiq workers (launched via unicorn master)
|
|
|
|
sidekiq_workers = 5
|
2014-08-08 14:31:31 +08:00
|
|
|
|
2015-02-17 06:58:23 +08:00
|
|
|
# connection reaping helps keep connection counts down, postgres
|
|
|
|
# will not work properly with huge numbers of open connections
|
|
|
|
# reap connections from pool that are older than 30 seconds
|
|
|
|
connection_reaper_age = 30
|
2018-06-14 16:22:02 +08:00
|
|
|
|
2015-02-17 06:58:23 +08:00
|
|
|
# run reap check every 30 seconds
|
|
|
|
connection_reaper_interval = 30
|
2015-03-09 08:45:36 +08:00
|
|
|
|
2023-09-05 15:06:31 +08:00
|
|
|
# set to relative URL (for subdirectory/subfolder hosting)
|
2015-03-09 08:45:36 +08:00
|
|
|
# IMPORTANT: path must not include a trailing /
|
|
|
|
# EG: /forum
|
2018-04-11 04:27:03 +08:00
|
|
|
relative_url_root =
|
2016-02-04 10:58:38 +08:00
|
|
|
|
|
|
|
# increasing this number will increase redis memory use
|
|
|
|
# this ensures backlog (ability of channels to catch up are capped)
|
|
|
|
# message bus default cap is 1000, we are winding it down to 100
|
|
|
|
message_bus_max_backlog_size = 100
|
2017-02-01 06:21:37 +08:00
|
|
|
|
2022-02-23 00:16:02 +08:00
|
|
|
# how often the message-bus backlog should be cleared
|
|
|
|
# lower values will make memory usage more consistent, but will
|
|
|
|
# increase redis CPU demands
|
|
|
|
message_bus_clear_every = 50
|
|
|
|
|
2017-02-01 06:21:37 +08:00
|
|
|
# must be a 64 byte hex string, anything else will be ignored with a warning
|
|
|
|
secret_key_base =
|
2017-03-21 03:59:06 +08:00
|
|
|
|
|
|
|
# fallback path for all assets which are served via the application
|
|
|
|
# used by static_controller
|
|
|
|
# in multi host setups this allows you to have old unicorn instances serve
|
|
|
|
# newly compiled assets
|
|
|
|
fallback_assets_path =
|
2017-10-06 13:20:01 +08:00
|
|
|
|
|
|
|
# S3 settings used for serving ALL public files
|
2021-05-21 09:43:47 +08:00
|
|
|
# be sure to configure a CDN as well per cdn_url
|
2017-10-06 13:20:01 +08:00
|
|
|
s3_bucket =
|
|
|
|
s3_region =
|
|
|
|
s3_access_key_id =
|
|
|
|
s3_secret_access_key =
|
2019-08-29 20:17:41 +08:00
|
|
|
s3_use_iam_profile =
|
2017-10-06 13:20:01 +08:00
|
|
|
s3_cdn_url =
|
2018-07-16 12:44:55 +08:00
|
|
|
s3_endpoint =
|
2020-04-30 06:04:59 +08:00
|
|
|
s3_http_continue_timeout =
|
2020-05-26 04:09:34 +08:00
|
|
|
s3_install_cors_rule =
|
2023-11-10 07:50:23 +08:00
|
|
|
enable_s3_transfer_acceleration =
|
2017-12-11 08:07:22 +08:00
|
|
|
|
2022-12-08 18:36:20 +08:00
|
|
|
# Optionally, specify a separate CDN to be used for static JS assets stored on S3
|
|
|
|
s3_asset_cdn_url =
|
|
|
|
|
2017-12-11 08:07:22 +08:00
|
|
|
### rate limits apply to all sites
|
|
|
|
max_user_api_reqs_per_minute = 20
|
|
|
|
max_user_api_reqs_per_day = 2880
|
|
|
|
|
2021-06-03 17:52:43 +08:00
|
|
|
max_admin_api_reqs_per_minute = 60
|
2017-12-11 14:21:00 +08:00
|
|
|
|
2018-01-22 10:18:30 +08:00
|
|
|
max_reqs_per_ip_per_minute = 200
|
|
|
|
max_reqs_per_ip_per_10_seconds = 50
|
2018-03-06 12:20:39 +08:00
|
|
|
|
|
|
|
# applies to asset type routes (avatars/css and so on)
|
|
|
|
max_asset_reqs_per_ip_per_10_seconds = 200
|
|
|
|
|
2018-01-08 05:39:17 +08:00
|
|
|
# global rate limiter will simply warn if the limit is exceeded, can be warn+block, warn, block or none
|
2019-11-18 12:54:50 +08:00
|
|
|
max_reqs_per_ip_mode = block
|
2018-01-08 05:39:17 +08:00
|
|
|
|
|
|
|
# bypass rate limiting any IP resolved as a private IP
|
2018-01-22 10:18:30 +08:00
|
|
|
max_reqs_rate_limit_on_private = false
|
2018-04-18 14:58:40 +08:00
|
|
|
|
FEATURE: Apply rate limits per user instead of IP for trusted users (#14706)
Currently, Discourse rate limits all incoming requests by the IP address they
originate from regardless of the user making the request. This can be
frustrating if there are multiple users using Discourse simultaneously while
sharing the same IP address (e.g. employees in an office).
This commit implements a new feature to make Discourse apply rate limits by
user id rather than IP address for users at or higher than the configured trust
level (1 is the default).
For example, let's say a Discourse instance is configured to allow 200 requests
per minute per IP address, and we have 10 users at trust level 4 using
Discourse simultaneously from the same IP address. Before this feature, the 10
users could only make a total of 200 requests per minute before they got rate
limited. But with the new feature, each user is allowed to make 200 requests
per minute because the rate limits are applied on user id rather than the IP
address.
The minimum trust level for applying user-id-based rate limits can be
configured by the `skip_per_ip_rate_limit_trust_level` global setting. The
default is 1, but it can be changed by either adding the
`DISCOURSE_SKIP_PER_IP_RATE_LIMIT_TRUST_LEVEL` environment variable with the
desired value to your `app.yml`, or changing the setting's value in the
`discourse.conf` file.
Requests made with API keys are still rate limited by IP address and the
relevant global settings that control API keys rate limits.
Before this commit, Discourse's auth cookie (`_t`) was simply a 32 characters
string that Discourse used to lookup the current user from the database and the
cookie contained no additional information about the user. However, we had to
change the cookie content in this commit so we could identify the user from the
cookie without making a database query before the rate limits logic and avoid
introducing a bottleneck on busy sites.
Besides the 32 characters auth token, the cookie now includes the user id,
trust level and the cookie's generation date, and we encrypt/sign the cookie to
prevent tampering.
Internal ticket number: t54739.
2021-11-18 04:27:30 +08:00
|
|
|
# use per user rate limits vs ip rate limits for users with this trust level or more.
|
|
|
|
skip_per_ip_rate_limit_trust_level = 1
|
|
|
|
|
2018-04-18 14:58:40 +08:00
|
|
|
# logged in DoS protection
|
|
|
|
|
|
|
|
# protection will only trigger for requests that queue longer than this amount
|
2018-04-23 09:54:58 +08:00
|
|
|
force_anonymous_min_queue_seconds = 1
|
2018-04-18 14:58:40 +08:00
|
|
|
# only trigger anon if we see more than N requests for this path in last 10 seconds
|
|
|
|
force_anonymous_min_per_10_seconds = 3
|
|
|
|
|
2020-10-13 13:56:03 +08:00
|
|
|
# Any requests with the headers Discourse-Background = true will not be allowed to queue
|
|
|
|
# longer than this amount of time.
|
|
|
|
# Discourse will rate limit and ask client to try again later.
|
|
|
|
background_requests_max_queue_length = 0.5
|
|
|
|
|
2019-08-09 15:47:44 +08:00
|
|
|
# if a message bus request queues for 100ms or longer, we will reject it and ask consumer
|
|
|
|
# to back off
|
|
|
|
reject_message_bus_queue_seconds = 0.1
|
|
|
|
|
2019-07-02 09:21:52 +08:00
|
|
|
# disable search if app server is queueing for longer than this (in seconds)
|
|
|
|
disable_search_queue_threshold = 1
|
|
|
|
|
2019-01-04 06:24:46 +08:00
|
|
|
# maximum number of posts rebaked across the cluster in the periodical job
|
|
|
|
# rebake process is very expensive, on multisite we have to make sure we never
|
|
|
|
# flood the queue
|
|
|
|
max_old_rebakes_per_15_minutes = 300
|
|
|
|
|
2019-03-22 11:11:21 +08:00
|
|
|
# maximum number of log messages in /logs
|
|
|
|
max_logster_logs = 1000
|
|
|
|
|
2019-05-27 14:51:24 +08:00
|
|
|
# during precompile update maxmind database if older than N days
|
|
|
|
# set to 0 to disable
|
2020-01-03 13:31:28 +08:00
|
|
|
refresh_maxmind_db_during_precompile_days = 2
|
2019-05-27 14:51:24 +08:00
|
|
|
|
|
|
|
# backup path containing maxmind db files
|
|
|
|
maxmind_backup_path =
|
|
|
|
|
2020-01-03 13:31:28 +08:00
|
|
|
# register an account at: https://www.maxmind.com/en/geolite2/signup
|
|
|
|
# then head to profile and get your license key
|
2024-04-02 14:53:53 +08:00
|
|
|
maxmind_license_key =
|
|
|
|
|
|
|
|
# Configures a URL mirror to download the MaxMind databases from.
|
|
|
|
# When set, the file path will be appended to the mirror's URL.
|
|
|
|
# If the mirror URL is https://some.url.com/maxmind/mirror for example, the
|
|
|
|
# GeoLite2-City database file will be downloaded from https://some.url.com/maxmind/mirror/GeoLite2-City.tar.gz
|
|
|
|
maxmind_mirror_url =
|
2020-01-03 13:31:28 +08:00
|
|
|
|
2019-06-05 14:08:11 +08:00
|
|
|
# when enabled the following headers will be added to every response:
|
|
|
|
# (note, if measurements do not exist for the header they will be omitted)
|
|
|
|
#
|
|
|
|
# X-Redis-Calls: 10
|
|
|
|
# X-Redis-Time: 1.02
|
|
|
|
# X-Sql-Calls: 102
|
|
|
|
# X-Sql-Time: 1.02
|
|
|
|
# X-Queue-Time: 1.01
|
|
|
|
enable_performance_http_headers = false
|
|
|
|
|
2019-08-20 09:29:11 +08:00
|
|
|
# gather JavaScript errors from clients (rate limited to 1 error per IP per minute)
|
|
|
|
enable_js_error_reporting = true
|
|
|
|
|
2019-08-29 13:34:36 +08:00
|
|
|
# This is probably not a number you want to touch, it controls the number of workers
|
|
|
|
# we allow mini scheduler to run. Prior to 2019 we ran a single worker.
|
|
|
|
# On extremely busy setups this could lead to situations where regular jobs would
|
|
|
|
# starve. Specifically jobs such as "run heartbeat" which keeps sidekiq running.
|
|
|
|
# Having a high number here is very low risk. Regular jobs are limited in scope and scale.
|
|
|
|
mini_scheduler_workers = 5
|
|
|
|
|
2019-09-04 15:18:32 +08:00
|
|
|
# enable compression on anonymous cache redis entries
|
|
|
|
# this slightly increases the cost of storing cache entries but can make it much
|
|
|
|
# cheaper to retrieve cache entries when redis is stores on a different machine to the one
|
|
|
|
# running the web
|
|
|
|
compress_anon_cache = false
|
|
|
|
|
|
|
|
# Only store entries in redis for anonymous cache if they are observed more than N times
|
|
|
|
# for a specific key
|
|
|
|
#
|
|
|
|
# This ensures there are no pathological cases where we keep storing data in anonymous cache
|
|
|
|
# never to use it, set to 1 to store immediately, set to 0 to disable anon cache
|
|
|
|
anon_cache_store_threshold = 2
|
2020-06-03 11:19:42 +08:00
|
|
|
|
|
|
|
# EXPERIMENTAL - not yet supported in production
|
|
|
|
# by default admins can install and amend any theme
|
|
|
|
# you may restrict it so only specific themes are approved
|
2020-07-27 08:23:54 +08:00
|
|
|
# in allowlist mode all theme updates must happen via git repos
|
2020-06-03 11:19:42 +08:00
|
|
|
# themes missing from the list are automatically disallowed
|
2021-05-21 09:43:47 +08:00
|
|
|
# list is a comma separated list of git repos eg:
|
2020-06-03 11:19:42 +08:00
|
|
|
# https://github.com/discourse/discourse-custom-header-links.git,https://github.com/discourse/discourse-simple-theme.git
|
2020-07-27 08:23:54 +08:00
|
|
|
allowed_theme_repos =
|
2020-07-24 15:09:29 +08:00
|
|
|
|
|
|
|
# Demon::EmailSync is used in conjunction with the enable_imap site setting
|
|
|
|
# to sync N IMAP mailboxes with specific groups. It is a process started in
|
|
|
|
# unicorn.conf, and it spawns N threads (one for each multisite connection) and
|
|
|
|
# for each database spans another N threads (one for each configured group).
|
|
|
|
#
|
|
|
|
# We want this off by default so the process is not started when it does not
|
|
|
|
# need to be (e.g. development, test, certain hosting tiers)
|
|
|
|
enable_email_sync_demon = false
|
2020-10-07 14:30:15 +08:00
|
|
|
|
|
|
|
# we never want to queue more than 10000 digests per 30 minute block
|
|
|
|
# this can easily lead to blocking sidekiq
|
|
|
|
# on multisites we recommend a far lower number
|
|
|
|
max_digests_enqueued_per_30_mins_per_site = 10000
|
2021-03-15 12:41:59 +08:00
|
|
|
|
|
|
|
# This cluster name can be passed to the /srv/status route to verify
|
|
|
|
# the application cluster is the same one you are expecting
|
|
|
|
cluster_name =
|
2021-09-11 03:19:52 +08:00
|
|
|
|
|
|
|
# The YAML file used to configure multisite clusters
|
|
|
|
multisite_config_path = config/multisite.yml
|
2021-11-12 01:12:25 +08:00
|
|
|
|
|
|
|
# If false, only short (regular) polling will be attempted
|
|
|
|
enable_long_polling =
|
|
|
|
|
|
|
|
# Length of time to hold open a long polling connection in milliseconds
|
|
|
|
long_polling_interval =
|
2022-10-12 07:11:44 +08:00
|
|
|
|
2024-03-27 17:06:50 +08:00
|
|
|
# Specify the mode for the early hint header. Can be nil (disabled), "preconnect" (lists just CDN domains) or "preload" (lists all assets).
|
|
|
|
# The 'preload' mode currently serves inconsistent headers for different pages/users, and is not recommended for production use.
|
|
|
|
early_hint_header_mode =
|
|
|
|
|
|
|
|
# Specify which header name to use for the early hint. Defaults to "Link", but can be changed to support different proxy mechanisms.
|
|
|
|
early_hint_header_name = "Link"
|
2022-12-02 18:07:25 +08:00
|
|
|
|
|
|
|
# When using an external upload store, redirect `user_avatar` requests instead of proxying
|
|
|
|
redirect_avatar_requests = false
|
2023-01-19 21:59:11 +08:00
|
|
|
|
|
|
|
# Force the entire cluster into postgres readonly mode. Equivalent to running `Discourse.enable_pg_force_readonly_mode`
|
|
|
|
pg_force_readonly_mode = false
|
2023-02-21 06:54:29 +08:00
|
|
|
|
|
|
|
# default DNS query timeout for FinalDestination (used when not explicitely given programmatically)
|
|
|
|
dns_query_timeout_secs =
|
2023-03-22 20:01:35 +08:00
|
|
|
|
|
|
|
# Default global regex timeout
|
2023-04-03 17:43:28 +08:00
|
|
|
regex_timeout_seconds = 2
|
2023-03-23 12:16:05 +08:00
|
|
|
|
|
|
|
# Allow impersonation function on the cluster to admins
|
|
|
|
allow_impersonation = true
|
2023-10-02 11:41:34 +08:00
|
|
|
|
|
|
|
# The maximum number of characters allowed in a single log line.
|
|
|
|
log_line_max_chars = 160000
|
2023-11-28 19:28:40 +08:00
|
|
|
|
|
|
|
# this value is included when generating static asset URLs.
|
|
|
|
# Updating the value will allow site operators to invalidate all asset urls
|
|
|
|
# to recover from configuration issues which may have been cached by CDNs/browsers.
|
2024-03-18 13:45:41 +08:00
|
|
|
asset_url_salt =
|
2024-02-07 18:44:12 +08:00
|
|
|
|
|
|
|
# disable service-worker caching. An 'offline' page will still be used as an offline fallback.
|
|
|
|
# This flag is for a temporary experiment, and may be removed at any time
|
2024-02-16 23:03:05 +08:00
|
|
|
disable_service_worker_cache = true
|