Code Monkey home page Code Monkey logo

traefik-real-ip's People

Contributors

dcwestra avatar jramsgz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

dcwestra

traefik-real-ip's Issues

Still doesnt work

Glad you are attempting to fix this. I am still getting the same error though:

X-Forwarded-For: , 172.24.147.50

A couple possible solutions to consider:

  1. Check to see if cfConnectingIP is null first, if so, do nothing.

  2. It seems that the code first sets xForwardedFor to the (Blank) , (IpAddress) first (Line 54). Maybe this edit to the layout of xForwardedFor should be a sub-function of checking cfConnectingIp for not null (line 69).

  3. change line 75 from if realIP == "" to if xRealIP == ''"

the realIP isnt currently null during the process, during the function on line 54, it gets that (Blank) , (IpAddress). So the funtion on line 75, never happens. But when the error occurs, xRealIP is still null. So that can be the check for calling the rest of the function.

It doesn't work

My traefik.yml looks like this:

experimental: plugins: traefik-real-ip: modulename: github.com/jramsgz/traefik-real-ip version: v1.0.6

My middleware.yml looks like this:

http: middlewares: traefik-real-ip: plugin: traefik-real-ip: excludednets: - "1.1.1.1/24"

and the service file like this:

http: routers: traefik: entryPoints: - websecure middlewares: - traefik-real-ip tls: {} service: api@internal rule: "Host(traefik.domain.de)"

nevertheless it still shows an IP from Cloudflare under the access log, what have I done wrong ?

Acces Log:

1.33 - jan [15/Nov/2023:19:33:20 +0000] "GET /dashboard/css/6d73c73c.9b22e80f.css HTTP/2.0" 200 378 "-" "-" 633 "traefik@file" "-" 0ms 172.69.151.116 - jan [15/Nov/2023:19:33:20 +0000] "GET /dashboard/css/52875482.9b22e80f.css HTTP/2.0" 200 378 "-" "-" 634 "traefik@file" "-" 0ms 172.69.151.56 - jan [15/Nov/2023:19:33:20 +0000] "GET /dashboard/js/4d42dcea.18f43827.js HTTP/2.0" 200 39952 "-" "-" 635 "traefik@file" "-" 1ms 172.69.150.207 - jan [15/Nov/2023:19:33:20 +0000] "GET /dashboard/css/797e4f23.9b22e80f.css HTTP/2.0" 200 378 "-" "-" 636 "traefik@file" "-" 0ms 172.69.150.111 - jan [15/Nov/2023:19:33:20 +0000] "GET /dashboard/css/e036c7dc.1666b9a0.css HTTP/2.0" 200 2871 "-" "-" 637 "traefik@file" "-" 0ms 172.69.150.224 - jan [15/Nov/2023:19:33:20 +0000] "GET /dashboard/js/b34404c8.7a4b9be8.js HTTP/2.0" 200 6917 "-" "-" 638 "traefik@file" "-" 0ms 172.69.150.119 - jan [15/Nov/2023:19:33:20 +0000] "GET /dashboard/js/067758be.c7890581.js HTTP/2.0" 200 11437 "-" "-" 639 "traefik@file" "-" 1ms 172.69.151.218 - jan [15/Nov/2023:19:33:21 +0000] "GET /dashboard/css/491024e9.9b22e80f.css HTTP/2.0" 200 378 "-" "-" 640 "traefik@file" "-" 0ms

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.