diff options
Diffstat (limited to '')
| -rw-r--r-- | contrib/webmentions-ssg.example.cfg | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/webmentions-ssg.example.cfg b/contrib/webmentions-ssg.example.cfg index 577eeef..a5dbaf9 100644 --- a/contrib/webmentions-ssg.example.cfg +++ b/contrib/webmentions-ssg.example.cfg @@ -26,6 +26,14 @@ BOOTSTRAP_SERVE_LOCAL = True # Upgrading to password-bound sessions also requires users to sign in again once. SECRET_KEY = "REPLACE_WITH_A_LONG_RANDOM_SECRET" +# When deployed behind a trusted reverse proxy, set this to the EXACT number +# of trusted hops that set X-Forwarded-For and X-Forwarded-Proto. Use 1 for a +# single nginx instance directly in front of the application; 0 (default) +# ignores forwarded headers. Do not enable this if the backend is reachable +# directly or if the proxy fails to overwrite untrusted forwarded headers. +# See README.md for an nginx example and multi-proxy caveats. +PROXY_FIX_TRUSTED_HOPS = 0 + # --------------------------------------------------------------------------- # Database and logging # --------------------------------------------------------------------------- @@ -100,8 +108,13 @@ ENDPOINT_GLOBAL_RATE_LIMIT = "1000/hour" # Minimum seconds between verifications of the same source/target pair. ENDPOINT_REVERIFY_COOLDOWN_SECONDS = 600 -# Limit login POST attempts per client. +# Limit login POST attempts per client IP, and separately for each submitted +# username across IPs (case-folded and hashed before being used as a key). +# Both limits apply to POSTs, even unsuccessful validation attempts. A per-user +# bucket can be deliberately exhausted to temporarily deny that account login; +# keep its allowance higher than the per-IP limit and monitor for abuse. LOGIN_RATE_LIMIT = "5/minute;30/hour" +LOGIN_USERNAME_RATE_LIMIT = "20/minute;100/hour" # --------------------------------------------------------------------------- # Sending Webmentions from a statically generated site |
