add URL_PREFIX config for reverse proxy path support

This commit is contained in:
Username
2025-12-20 04:43:36 +01:00
parent c76a158c18
commit 5770698847
2 changed files with 24 additions and 12 deletions

View File

@@ -44,6 +44,9 @@ class Config:
# Secret key for signing challenges (auto-generated if not set)
POW_SECRET = os.environ.get("FLASKPASTE_POW_SECRET", "")
# URL prefix for reverse proxy deployments (e.g., "/paste" for mymx.me/paste)
URL_PREFIX = os.environ.get("FLASKPASTE_URL_PREFIX", "").rstrip("/")
class DevelopmentConfig(Config):
"""Development configuration."""