no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Last revision
fuss:trac [2017/11/25 10:32] – created office
Line 1: Line 1:
 +====== Trac behind Proxy ======
 +
 +Trac uses ''REMOTE_ADDRESS'' to determine the client's IP address which can mislead the trac spam filters and flag a submission as spam. To change the behaviour, [[https://trac.edgewall.org/ticket/5199|trac can be modified]], to check the ''X-Real-IP'' and ''X-Forwarded-For'' headers by editing the ''trac/web/standalone.py'' file in the trac source and rebuilding trac:
 +<code>
 +--- trac/web/standalone.py.old 2011-12-12 14:01:33.546973494 +0000
 ++++ trac/web/standalone.py 2011-12-12 14:00:50.554973513 +0000
 +@@ -112,6 +112,11 @@
 +     server_version = 'tracd/' + VERSION
 + 
 +     def address_string(self):
 ++        # Get remote address of client if tracd is behind a proxy
 ++        ip = self.headers.get("X-Real-IP") or \
 ++             self.headers.get("X-Forwarded-For")
 ++        if ip:
 ++            return ip
 +         # Disable reverse name lookups
 +         return self.client_address[:2][0]
 +</code>
  

fuss/trac.txt · Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.