-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't login when use http://IP:port #29451
Comments
Please confirm you can visit it normally from your LAN. Otherwise, find the problem of your FRP configuration. |
Thanks for the reply! |
Can you provide some details about the login post request in |
I tested this issue. When the ROOT_URL is configured to use HTTPS, logging in using HTTP will redirect to the home page, rather than the IP:port. However, using HTTP for the ROOT_URL works fine. |
By my test, if login success, it will always redirect to "/", so no matter what |
I believe this problem is related to PR #26999. When loading a page using HTTP, the browser detects that the cookie is secure and prevents the addition of other cookies. As a result, Gitea cannot verify the login information. Therefore, this may not be a bug, as this security feature is provided by the browser. |
Wow, that's worked. When I set the |
We close issues that need feedback from the author if there were no new comments for a month. 🍵 |
"Unable to login" usually means some cookie problems (>99% cases) For example, using "https" means "https-only cookie", then it doesn't work with http (config option: COOKIE_SECURE) |
Description
I have edited the config of ROOT_URL to my domain, because I have to visit the website out of LAN by frp.
But I can't login when use http://IP:port. When I click login, I will be redirected to home page.
2024-02-27.21.40.23.mov
And if I visit my gitea by my domain, it will be fine.
default.mov
That's my app.ini:
Gitea Version
1.21.6
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
No response
Operating System
Ubuntu 22.04
How are you running Gitea?
Docker
Database
SQLite
The text was updated successfully, but these errors were encountered: