Git Product home page Git Product logo

yourls_reverseproxy's Introduction

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()

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 that1
and Heroku has router infrastructure which behaves in a similar fashion.3

Installation

  1. Fetch/pull/download the repo
  2. Copy the folder reverseproxy into YOURLS_ABSPATH/user/plugins where YOURLS_ABSPATH is the location your YOURLS install is located in.
  3. Activate plugin on administrator interface.
  4. ???
  5. Profit!

1 https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs-Logging-visitor-IP-addresses-with-mod-cloudflare--

2 https://devcenter.heroku.com/articles/http-routing#heroku-headers

yourls_reverseproxy's People

Contributors

itsdrike avatar mikeschroll avatar diftraku avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.