GithubHelp home page GithubHelp logo

IP passthrough issue about caddy HOT 3 CLOSED

9mlcy7 avatar 9mlcy7 commented on May 28, 2024
IP passthrough issue

from caddy.

Comments (3)

mholt avatar mholt commented on May 28, 2024

the upstream server's nginx still gets the Caddy server's local IP instead of the client's IP.

In what way? The connection will always be coming from Caddy, nginx has to be reading the headers to get the IP...

(Closing, since I'm not sure this is a bug and it's not really actionable right now, but we can reopen if needed. Feel free to continue discussion.)

from caddy.

9mlcy7 avatar 9mlcy7 commented on May 28, 2024

"Sorry, this is my first time using Caddy.

The flow is: Client (192.168.0.105) -> Caddy (192.168.0.150) -> Nginx (192.168.0.121).

I've configured X-Forwarded-For and X-REAL-IP in Caddy as well, but Nginx's logs still show the IP of Caddy instead of the client's IP."

nginx config:

server {
    listen       80;
    server_name  localhost;
    location / {
        root   html;
        index  index.html index.htm;
    }
}

from caddy.

mholt avatar mholt commented on May 28, 2024

That might require extra config on nginx's side: https://gist.github.com/dublado/30494c771730437ee88209f168b9affd

from caddy.

Related Issues (20)

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.