Giter Site home page Giter Site logo

Comments (7)

mpociot avatar mpociot commented on August 25, 2024

Yeah, I know. This happens on my current server as well. This is worth a PR :)

from expose.

thomas-alrek avatar thomas-alrek commented on August 25, 2024

@mpociot I can make a PR if you want. I was thinking this could be solved in one of the following ways.
In Nginx, i could set the header X-Forwared-Port, and expose could parse that if available. The other option would be to use a setting in the config file.

from expose.

mpociot avatar mpociot commented on August 25, 2024

Hm... can't we modify this dynamically based on the port that is used to visit the admin interface?
If I'm on port 80 or 443, we could just omit port 8080

from expose.

thomas-alrek avatar thomas-alrek commented on August 25, 2024

That might work. I'm just not sure how that works. Technically the server is still running on 8080 internally. Does PHP set its $_SERVER variables based on the proxied request?

from expose.

peterfox avatar peterfox commented on August 25, 2024

You should be able to fix this by looking at x-forwarded-port check if it doesn't match the internal server, for instance an SSL proxy will give 443 while the server itself is on 8080.

from expose.

dbpolito avatar dbpolito commented on August 25, 2024

I think i found where the problem is:

https://github.com/beyondcode/expose/blob/master/app/Server/Http/Controllers/TunnelMessageController.php#L108-L114

What's is happening is that we're setting the trusted proxy to the socket remote ip, which is different from what's is being checked on isSecure() method, which is server->get('REMOTE_ADDR').

I will try to play with that when i have a chance....

from expose.

Thomas-ICEPAY avatar Thomas-ICEPAY commented on August 25, 2024

This information is available in the $connectionInfo object when the first connection is made. Isn't it better to store this in the connection storage and echo it back later instead of deriving it from the admin dashboard session?

#378

from expose.

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.