erlend_sh
(Erlend Sogge Heggen)
2017 年11 月 8 日 08:57
21
Wonderful!
@mbcahyono could you please create a new topic for the plugin in plugin ?
3 个赞
chrisc
(Chris Croome)
2019 年1 月 18 日 08:28
22
The Discourse Images Guardian plugin no longer works with the latest Discourse beta — you can’t set a URL for the logos any more so all images now require authentication, this results in the site logos returning 404’s for non-authenticated users, I have opened an issue for this on GitHub to see if we can find a way to solve this.
chrisc
(Chris Croome)
2019 年2 月 7 日 11:22
23
The Discourse Images Guardian has been updated by @mbcahyono so it now works with the latest Discourse beta, I have deployed it to a couple of servers running v2.3.0.beta1 .
4 个赞
chrisc
(Chris Croome)
2019 年3 月 14 日 10:02
24
The Discourse Images Guardian plugin doesn’t currently work with the latest Discourse v2.3.0.beta5, I have had to disable it on a couple of sites. I have raised an issue for this on GitHub and hopefully @mbcahyono will have a suggestion for a fix for this soon.
2 个赞
martin
(Martin Brennan)
2019 年11 月 18 日 03:10
25
今天我们开始内部测试一项新的“安全媒体”设置,该设置仅在启用 S3 上传时可用。其功能如下:
对于启用了“需要登录”设置的 Discourse 实例,所有上传均被视为安全;若该设置未启用,则仅私信中的上传被视为安全。
帖子和私信中所有安全上传的媒体 URL 将不再直接指向文件,而是先通过一个端点根据站点设置验证访问权限。
邮件中的安全媒体将被占位符文本替换,提示用户登录 Discourse 实例以查看媒体内容。
如果某次上传此前已在安全上下文中使用过,则不允许将其发布到公开话题中。
该设置目前仅适用于自托管的 Discourse 实例。内部测试完成后,我们将提供进一步更新。
14 个赞
martin
(Martin Brennan)
2019 年11 月 26 日 23:44
27
帖子和私信中的媒体 URL 会被替换为 Discourse 服务器 URL,该服务器随后提供上传文件的私有 S3 URL。
2 个赞
sam
(Sam Saffron)
2019 年11 月 27 日 02:07
28
在此澄清一下。
缺点是您无法再为私有内容使用 CDN,每张图片请求/下载都必须“经过”应用程序,以便为用户解锁存储桶。
在小型内部论坛上,您几乎不会察觉到任何影响。但在需要登录的大型论坛上,放弃 CDN 并通过应用程序转发请求可能会产生一定影响。
6 个赞
chrisc
(Chris Croome)
2025 年3 月 28 日 09:08
29
Image Guardian 插件无法与最新的 Discourse 配合使用,我已在 GitHub 上为此事开了一个 issue:
opened 09:02AM - 28 Mar 25 UTC
closed 08:54AM - 12 Jul 25 UTC
The [latest Discourse](https://meta.discourse.org/t/3-5-0-beta2-review-queue-wel… come-banner-admin-interface-and-more/358151) doesn't work with this plugin with these settings in `containers/app.yml`:
```yaml
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/muhlisbc/discourse-images-guardian.git
- erb /var/www/discourse/plugins/discourse-images-guardian/nginx.sample.conf.erb
> /var/www/discourse/config/nginx.sample.conf
```
Rebuilding the container fails with:
```
** INCOMPATIBLE PLUGIN **
You are unable to start Discourse due to errors in the plugin at
/var/www/discourse/plugins/discourse-images-guardian
Please try removing this plugin and rebuilding again!
```
I did look at using the [Secure uploads](https://meta.discourse.org/t/disallow-anonymous-users-from-viewing-image-file-urls/40335/24) option, but this only works with uploads going to S3:

Is there any chance the plugin could be made to work again @muhlisbc ? Thanks!
我确实尝试过使用 Secure uploads 选项,但这需要使用 S3,而有问题的论坛并非如此。因此,它仍然是必需的,希望 @mbcahyono 能够解决这个问题……
mbcahyono
(Muhlis Cahyono)
2025 年4 月 13 日 12:04
32
@chrisc
committed 12:00PM - 13 Apr 25 UTC
这应该可以修复重建错误。不过我还没来得及测试实际功能。
1 个赞
chrisc
(Chris Croome)
2025 年4 月 13 日 12:48
33
太棒了 @mbcahyono 我已经安装并测试过了,一切正常 再次感谢!
1 个赞
chrisc
(Chris Croome)
2025 年4 月 14 日 10:31
34
@mbcahyono 是否有可能也保护用户上传的头像图标,使其在查看时需要 cookie?
它们的 URL 路径类似于 /user_avatar/$DOMAIN_NAME/$USER_NAME/$NUNBER/$ANOTHER_NUMBER.png。