fix: use internal Forgejo URL for token exchange and verification
Public git.georgsen.dk unreachable from LAN due to hairpin NAT. Authorization endpoint stays public (browser redirect), but token exchange and token verification use internal 10.5.0.14:3000. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5d08e15b0f
commit
d60b0208db
1 changed files with 4 additions and 2 deletions
|
|
@ -53,12 +53,14 @@ class ForgejoTokenVerifier(TokenVerifier):
|
|||
|
||||
|
||||
creds = load_credentials()
|
||||
FORGEJO_INTERNAL = "http://10.5.0.14:3000"
|
||||
|
||||
auth = OAuthProxy(
|
||||
upstream_authorization_endpoint=f"{FORGEJO_URL}/login/oauth/authorize",
|
||||
upstream_token_endpoint=f"{FORGEJO_URL}/login/oauth/access_token",
|
||||
upstream_token_endpoint=f"{FORGEJO_INTERNAL}/login/oauth/access_token",
|
||||
upstream_client_id=creds["FORGEJO_OAUTH_CLIENT_ID"],
|
||||
upstream_client_secret=creds["FORGEJO_OAUTH_CLIENT_SECRET"],
|
||||
token_verifier=ForgejoTokenVerifier(),
|
||||
token_verifier=ForgejoTokenVerifier(forgejo_url=FORGEJO_INTERNAL),
|
||||
base_url="https://mcp.georgsen.dk",
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue