mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4561] [Bug]: API endpoints are inaccessible after configuring reverse proxy #3127
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Aurora211 on GitHub (May 25, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4561
Describe the bug
When I used Python to try to obtain and set XRay configuration using Token according to the API documentation, I found that almost all API endpoints were inaccessible, all returning 404. I used Fiddler to capture and analyze the packets sent by Python and found no issues—they fully complied with the documentation requirements.
How to reproduce the problem
Expected behavior
When accessing
/panel/xray/using the POST method, the Xray configuration information should be returnedActual behavior
The API returned an HTTP 404 error with no explanation
Relevant logs
Screenshots
No response
3x-ui version
3.0.2
Xray-core version
26.4.25
How did you install 3x-ui?
Docker / Docker Compose
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
Backend (API endpoints, login, settings)
Browser (only if it is a UI bug)
This is not a UI bug
Is the panel behind a reverse proxy or CDN?
Yes — other
Before submitting
@StreetStrider commented on GitHub (Jun 21, 2026):
I experience this on
ghcr.io/mhsanaei/3x-ui:3.3.1. Can someone please explain what's happening here, is it a proper behavior or a bug? I'm seeing 404 on any API path. Cannot use API. @MHSanaei @Aurora211@Aurora211 commented on GitHub (Jun 22, 2026):
I can not fix the problem. All api endpoints which using token authorization is returning 404 error. But you can use Username and Password authorization to access the api you need. Remember to request for CSRF token and add it into your request header.@StreetStrider
@StreetStrider commented on GitHub (Jun 22, 2026):
@Aurora211 I'm using username/password scenario and also see 404. I'm automating inside container, so CSRF should not be a problem. I'm using username/password and not token because it is what allow me to create fully un-attended install with predefined inbounds/clients.
@MHSanaei Is it possible to re-open?
@Aurora211 commented on GitHub (Sep 4, 2026):
@StreetStrider You can refer to the method I wrote for logging in with a username and password along with CSRF. This program is used to access the 3xui application located inside the docker container. It can properly implement the login functionality. You can ignore classes such as XrayAPI loaded from
.types; they are my methods for parsing data.