Giter Site home page Giter Site logo

Comments (6)

alireza0 avatar alireza0 commented on July 27, 2024 2

OK! I have found it.
It happened after this change: 6c36c19

It seems gin package has an issue with this from long time ago.
I will role it back.

from x-ui.

pulsarice avatar pulsarice commented on July 27, 2024 1

I have a similar problem on v1.8.4. When Listen Domain is set, access to the panel is not possible.
Downgrading to v1.8.3 resolved the issue.

I don't know if this information is helpful:
I'm not using Nginx reverse proxy.
I'm using cloudflare CDN proxy to access the panel (on a non-standard port, utilizing cloudflare's origin rules to rewrite destination port number)

from x-ui.

alireza0 avatar alireza0 commented on July 27, 2024 1

This problem is now solved and will be available in next release

from x-ui.

alireza0 avatar alireza0 commented on July 27, 2024

Using Listen Domian is to limit access to the panel only by this domain.

If you have problem, you should debug the proxy and receved requests.
You can test it simply by a curl command:

curl -H "Host: example.com" http://ip:port/x-ui

from x-ui.

pulsarice avatar pulsarice commented on July 27, 2024

x-ui installed on a test VM, no tls,
webDomain example.com
webBasePath /path/

Version 1.8.3

root@debian:~# curl http://127.0.0.1:54321/path/ -i
HTTP/1.1 403 Forbidden
Date: Sat, 29 Jun 2024 14:58:33 GMT
Content-Length: 0

root@debian:~# curl -H "Host: example.com" http://127.0.0.1:54321/path/ -i
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Date: Sat, 29 Jun 2024 14:58:54 GMT
Transfer-Encoding: chunked

<!DOCTYPE html>
<html lang="en">
...

Upgraded to version 1.8.4

root@debian:~# curl http://127.0.0.1:54321/path/ -i
HTTP/1.1 403 Forbidden
Date: Sat, 29 Jun 2024 15:01:54 GMT
Content-Length: 0

root@debian:~# curl -H "Host: example.com" http://127.0.0.1:54321/path/ -i
HTTP/1.1 403 Forbidden
Date: Sat, 29 Jun 2024 15:09:25 GMT
Content-Length: 0

from x-ui.

pulsarice avatar pulsarice commented on July 27, 2024

I tested something else, If I include port number in Host header, the request succeeds:

version 1.8.4

root@debian:~# curl -H "Host: example.com" http://127.0.0.1:54321/path/ -i
HTTP/1.1 403 Forbidden
Date: Sat, 29 Jun 2024 15:49:13 GMT
Content-Length: 0

root@debian:~# curl -H "Host: example.com:54321" http://127.0.0.1:54321/path/ -i
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Date: Sat, 29 Jun 2024 15:49:27 GMT
Transfer-Encoding: chunked

<!DOCTYPE html>
<html lang="en">
...

from x-ui.

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.