This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
这2个功能到底怎么用?image_hotlink_template 和 multimedia_hotlink_template #10135
Labels
question
We may find it useful or that's what we missing
What feature is it?
下面是官方说明。介绍了原理。但是没给出完整实例。看得我一脸懵逼。
image_hotlink_template 和 multimedia_hotlink_template 允许用户提供链接模版用于替换媒体 URL。特定的路由和阅读器组合可能导致用户需要这些功能,但不是非常普遍。敏感字符将被自动转义,不会发生 XSS 攻击。替换范围仅限于媒体元素,即使注入脚本 URL 也不会被加载而造成 XSS。用户能且仅能控制的是「媒体从哪里来」。该功能通常不会带来副作用,如果需要开启这两个参数,请将 ALLOW_USER_HOTLINK_TEMPLATE 环境变量设置为 true
image_hotlink_template: 用于处理描述中图片的 URL,绕过防盗链等限制,留空不生效。用法参考 #2769 (opens new window)。可以使用 URL (opens new window)的所有属性(加上后缀 _ue 则会对其进行 URL 编码),格式为 JS 变量模板。例子:${protocol}//${host}${pathname}, https://i3.wp.com/${host}${pathname}, https://images.weserv.nl?url=${href_ue}
What problem does this feature solve?
来几个完整示例?
Additional description
No response
This is not a duplicated feature request
The text was updated successfully, but these errors were encountered: