a small traefik middleware plugin to remap CF-Connecting-IP over the top of X-Real-IP and X-Forwarded-For.
This has been done before but I didn't like the other implementations & wanted an excuse to do a golang thing.
Probably do not use this in production. Also, it looks like it maps CF-Visitor's "scheme" value, but it doesn't yet.
Define the plugin:
# Static configurationexperimental:plugins:middleflare:moduleName: github.com/neggles/middleflareversion: v0.0.2
# Dynamic configurationhttp:routers:my-router:rule: host(`demo.localhost`)service: service-fooentryPoints:- webmiddlewares:- middleflareservices:service-foo:loadBalancer:servers:- url: http://127.0.0.1:5000middlewares:middleflare:plugin:middleflare:includeDefault: truetrustedProxies: []
TODO
: Add these when it's not 1:30am...