瀏覽代碼

Fix issue with obey_x_forwarded_for not being False when "False" (#403)

Azrenbeth 2 年之前
父節點
當前提交
f86431b244
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      changelog.d/403.bugfix
  2. 1 1
      sydent/config/http.py

+ 1 - 0
changelog.d/403.bugfix

@@ -0,0 +1 @@
+Fix issue with `obey_x_forwarded_for` not being honoured.

+ 1 - 1
sydent/config/http.py

@@ -53,7 +53,7 @@ class HTTPConfig(BaseConfig):
         )
         self.replication_port = cfg.getint("http", "replication.https.port")
 
-        self.obey_x_forwarded_for = cfg.get("http", "obey_x_forwarded_for")
+        self.obey_x_forwarded_for = cfg.getboolean("http", "obey_x_forwarded_for")
 
         self.verify_federation_certs = cfg.getboolean("http", "federation.verifycerts")