-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Provide configuration to allow camo-media proxying #12802
Conversation
d7c57ed
to
c8368c8
Compare
Fix go-gitea#916 Signed-off-by: Andrew Thornton <art27@cantab.net>
c8368c8
to
742d357
Compare
Codecov Report
@@ Coverage Diff @@
## master #12802 +/- ##
==========================================
- Coverage 43.23% 43.21% -0.02%
==========================================
Files 650 651 +1
Lines 72048 72119 +71
==========================================
+ Hits 31150 31168 +18
- Misses 35852 35904 +52
- Partials 5046 5047 +1
Continue to review full report at Codecov.
|
This will need testing to ensure that I've created this correctly and that it is doing the correct thing. One of the things that would be good is if we could camo media urls for images stored on gitea itself however there is an issue with permissions which makes the whole thing a bit more complex. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
a smal unit test would be nice ... ... I'll have a look at this |
8ff8a01
to
3285a32
Compare
Is it a general mechanism and does it benefit most users? (maybe it's fine to protect privacy)
I would like to keep Gitea itself clear and simple (indeed, not too complex) ..... if the method is general, it's fine to me. |
👋 |
* Provide configuration to allow camo-media proxying Fix go-gitea#916 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* giteaoffical/main: (31 commits) Add Package Registry (go-gitea#16510) Show messages for users if the ROOT_URL is wrong, show JavaScript errors (go-gitea#18971) [skip ci] Updated translations via Crowdin Make git.OpenRepository accept Context (go-gitea#19260) Use full output of git show-ref --tags to get tags for PushUpdateAddTag (go-gitea#19235) When conflicts have been previously detected ensure that they can be resolved (go-gitea#19247) More commit info from API (go-gitea#19252) Move some issue methods as functions (go-gitea#19255) Move project files into models/project sub package (go-gitea#17704) Granular webhook events in editHook (go-gitea#19251) Provide configuration to allow camo-media proxying (go-gitea#12802) Move init repository related functions to modules (go-gitea#19159) Move organization related structs into sub package (go-gitea#18518) Refactor repo clone button and repo clone links, fix JS error on empty repo page (go-gitea#19208) Show last cron messages on monitor page (go-gitea#19223) Allow API to create file on empty repo (go-gitea#19224) Use goproxy.io instead of goproxy.cn (go-gitea#19242) New cron task: delete old system notices (go-gitea#19219) Let web and API routes have different auth methods group (go-gitea#19168) Only send webhook events to active system webhooks and only deliver to active hooks (go-gitea#19234) ...
Provide configuration to switch on camouflaging of images by capturing and replacing all
<img src="...">
attributes with camouflaged urls.Fix #916
Signed-off-by: Andrew Thornton art27@cantab.net