-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add a config option to block "expensive" pages for anonymous users #34024
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
Conversation
At the moment, these paths are considered as "expensive":
|
0092b3f
to
3ae9466
Compare
done in 4500686 |
67b81ca
to
eeae063
Compare
…o-gitea#34024) Fix go-gitea#33966 ``` ;; User must sign in to view anything. ;; It could be set to "expensive" to block anonymous users accessing some pages which consume a lot of resources, ;; for example: block anonymous AI crawlers from accessing repo code pages. ;; The "expensive" mode is experimental and subject to change. ;REQUIRE_SIGNIN_VIEW = false ``` # Conflicts: # routers/api/v1/api.go # tests/integration/api_org_test.go
Since there are too many AI crawlers, try to backport it. The new code is covered by tests and it does nothing if users don't set it. |
* giteaofficial/main: [skip ci] Updated translations via Crowdin Add toggleClass function in dom.ts (go-gitea#34063) Add a config option to block "expensive" pages for anonymous users (go-gitea#34024) add additional ReplaceAll in pathsep to cater for different pathsep (go-gitea#34061) [skip ci] Updated translations via Crowdin enable staticcheck QFxxxx rules (go-gitea#34064) update to golangci-lint v2 (go-gitea#34054) Add descriptions for private repo public access settings and improve the UI (go-gitea#34057) Add anonymous access support for private/unlisted repositories (go-gitea#34051) Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (go-gitea#34053) Update action status badge layout (go-gitea#34018) Add anonymous access support for private repositories (backend) (go-gitea#33257) Simplify emoji rendering (go-gitea#34048) Adjust the layout of the toolbar on the Issues/Projects page (go-gitea#33667) Fix bug on downloading job logs (go-gitea#34041) Fix git client accessing renamed repo (go-gitea#34034) Decouple Batch from git.Repository to simplify usage without requiring the creation of a Repository struct. (go-gitea#34001) fix org repo creation being limited by user limits (go-gitea#34030) Fix the issue with error message logging for the `check-attr` command on Windows OS. (go-gitea#34035) Try to fix check-attr bug (go-gitea#34029)
"admin config settings page" is quite out-dated. A lot of config options are not there or incorrectly displayed there. To confirm, just try to visit a repo's file anonymously. If we'd like to make the "admin config settings page" work correctly, it needs to completely refactor the setting system. |
Fix #33966
Document: https://gitea.com/gitea/docs/pulls/191