mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-25 07:15:57 +03:00
[GH-ISSUE #63] Not working on different base_domain #34
Labels
No labels
bug
documentation
enhancement
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gitea-mirror#34
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 @CrazyWolf13 on GitHub (Aug 4, 2025).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/63
Originally assigned to: @arunavo4 on GitHub.
Hi
I run gitea-mirror like I do with all my services through nginxproxymanager via a dns record, that points the subdomain to nginxproxymanager which reverse-proxies giteamirror to gitea-mirror.mydomain.tld.
This is a pretty standart system, sometimes it requires websockets to be activated in nginxproxymanager, which I did for gitea-mirror.
No matter what I do, the pages don't show content and I can't even sing in:
@arunavo4 commented on GitHub (Aug 5, 2025):
@CrazyWolf13 please check your ENV variables are properly set
BETTER_AUTH_URL=https://gitea-mirror.mydomain.tld
BETTER_AUTH_TRUSTED_ORIGINS=https://gitea-mirror.mydomain.tld
@CrazyWolf13 commented on GitHub (Aug 27, 2025):
@arunavo4 Thanks!
Apologies, that totally slipped by.
Is there any way to add two urls?
So I can manage gitea mirror directly via IP and remote via domain, something like this:
Also what is the trusted origin for, I see no mention in the enviroment docs: https://github.com/RayLabsHQ/gitea-mirror/blob/main/docs/ENVIRONMENT_VARIABLES.md
@arunavo4 commented on GitHub (Aug 28, 2025):
@CrazyWolf13 Yes! Use BETTER_AUTH_TRUSTED_ORIGINS to specify additional access URLs:
BETTER_AUTH_URL=https://gitea-mirror.mydomain.tld
BETTER_AUTH_TRUSTED_ORIGINS=http://10.10.20.45:4321,http://192.168.1.100:4321
It specifies URLs allowed to make authentication requests, enabling:
Will update docs soon. Links to
better-authdocs https://www.better-auth.com/docs/reference/options#trustedorigins@CrazyWolf13 commented on GitHub (Aug 29, 2025):
Hi @arunavo4
Thanks a lot, I tried the following:
and also this:
Though both without success when using the IP:
@arunavo4 commented on GitHub (Aug 29, 2025):
Hey I think I found the issue, the client side is using window to get url and that's causing an issue when authenticating will fix it
@arunavo4 commented on GitHub (Aug 29, 2025):
@CrazyWolf13 Iin v3.5.0 add a new variable
PUBLIC_BETTER_AUTH_URLwhich makes sure that the client side calls the serverside using the valid url and notwindow.location.origin@CrazyWolf13 commented on GitHub (Aug 30, 2025):
@arunavo4 While the error for the invalid origin is gone, I'm stuck in a sign-in loop using the direct-ip, e.g. after seemingly successful login it redirects to login again, this over and over, trying to access "/" also redirects to login.
Using Public_Better_Auth_URL to access works without issues only when using the ip:port there are issues,