Fetch/pull/download the repo
February 28, 2025 ยท View on GitHub
This project has been archived, you may fork it and continue to develop it further.
The code may be insecure as it is and no effort to correct any bugs will be taken.
h2. YOURLS Reverse Proxy Plugin
Fixes the user IPs to point to the actual user instead of your cloud provider's infrastructure IPs, for now the following providers and their headers are supported:
- Cloudflare: This information is gathered from CF-Connecting-IP and applied as a filter to yourls_get_IP()
- Heroku: This information is gathered from X-Forwarded-For and applied as a filter to yourls_get_IP()
h3. Why?
Due to how CloudFlare is essentially a reverse proxy between your server and the internet at large, your server will end up seeing the reverse proxy instead of the client requesting the pagethe server will see the proxy IPs instead of the real IP that[1] and Heroku has router infrastructure which behaves in a similar fashion.[3]
h3. Installation