diff --git a/.env.development b/.env.development
index 0ac3a5d..4a24c0c 100644
--- a/.env.development
+++ b/.env.development
@@ -15,7 +15,7 @@ BEHIND_REVERSE_PROXY="false"
# set to "true" if your app is behind a proxy, this helps to get real IP address
# see: https://werkzeug.palletsprojects.com/en/latest/middleware/proxy_fix/#werkzeug.middleware.proxy_fix.ProxyFix
PROXYFIX_EXTRA_KWARGS='{}'
-# e.g., {"x_prefix": 1} to make url_for work behind reverse proxy (like `URL Rewrite`)
+# e.g., {"x_prefix": 1, "x_host": 1} to make url_for work behind reverse proxy (like `URL Rewrite`)
BIND_HOST="127.0.0.1"
BIND_PORT="5000"
SQLALCHEMY_DATABASE_URI="sqlite:///main.db"
\ No newline at end of file
diff --git a/README.md b/README.md
index aa597af..238d7e5 100644
--- a/README.md
+++ b/README.md
@@ -105,6 +105,7 @@ Example rule:
+
@@ -130,7 +131,7 @@ Example rule:
#### URL Rewrite
- Download and install [URL Rewrite](https://www.iis.net/downloads/microsoft/url-rewrite)
-- View Server Variables: add `HTTP_SEC_WEBSOCKET_EXTENSIONS` and `HTTP_X_FORWARDED_PREFIX` to allowlist
+- View Server Variables: add `HTTP_SEC_WEBSOCKET_EXTENSIONS`, `HTTP_X_FORWARDED_PREFIX`, `HTTP_X_FORWARDED_HOST` to allowlist
- URL Rewrite Rules: see `web.config` below
- Virtual directory: point from `clip-basepath` to `server/app/templates`
diff --git a/server/wsgi.py b/server/wsgi.py
index 4bf0dc7..f62d8bf 100644
--- a/server/wsgi.py
+++ b/server/wsgi.py
@@ -26,6 +26,7 @@ def parse_custom_args() -> None:
if any((export_metadata, export_openapi)):
no_run_server = True
+ environ["FLASK_ENV"] = "production"
from json import dump
if export_metadata: