Browse Source

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

Azrenbeth 2 năm trước cách đây
mục cha
commit
f86431b244
2 tập tin đã thay đổi với 2 bổ sung1 xóa
  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")