Skip to content
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

migrations.ALLOWED_DOMAINS doesn't work as expected with PROXY_URL set #32024

Closed
wolfogre opened this issue Sep 11, 2024 · 2 comments · Fixed by #32025
Closed

migrations.ALLOWED_DOMAINS doesn't work as expected with PROXY_URL set #32024

wolfogre opened this issue Sep 11, 2024 · 2 comments · Fixed by #32025
Labels
topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them type/bug

Comments

@wolfogre
Copy link
Member

Description

If Gitea starts with config:

[proxy]
PROXY_ENABLED = true
PROXY_URL = http://127.0.0.1:7890
PROXY_HOSTS = *.github.com,github.com

[migrations]
ALLOWED_DOMAINS = "" ; blank means external hosts will be allowed

It will fail to migrate repos from github.com.

image

Enabling ALLOW_LOCALNETWORKS can resolve it, but it's not the way as expected.

Gitea Version

main (d9a7748)

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Command with binary.

Database

SQLite

@wolfogre wolfogre added type/bug topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them labels Sep 11, 2024
@wolfogre
Copy link
Member Author

wolfogre commented Sep 11, 2024

I believe it's an overlooked similar work of #27655.

@lunny
Copy link
Member

lunny commented Sep 11, 2024

Because proxy url should be added to allowed migration url automatically?

wolfogre added a commit that referenced this issue Sep 11, 2024
)

Backport #32025 by @wolfogre

Fix #32024. Follow #27655.

After this PR, all usage of "new dial context" needs to provide a proxy,
so I dropped the old `NewDialContext` and renamed
`NewDialContextWithProxy` to `NewDialContext`.

Co-authored-by: Jason Song <[email protected]>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants