mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-06 23:00:25 +08:00
防盗链功能增加禁止的来源域名
This commit is contained in:
@@ -8,12 +8,16 @@ Vue.component("http-referers-config-box", {
|
||||
isOn: false,
|
||||
allowEmpty: true,
|
||||
allowSameDomain: true,
|
||||
allowDomains: []
|
||||
allowDomains: [],
|
||||
denyDomains: []
|
||||
}
|
||||
}
|
||||
if (config.allowDomains == null) {
|
||||
config.allowDomains = []
|
||||
}
|
||||
if (config.denyDomains == null) {
|
||||
config.denyDomains = []
|
||||
}
|
||||
return {
|
||||
config: config
|
||||
}
|
||||
@@ -23,6 +27,8 @@ Vue.component("http-referers-config-box", {
|
||||
return ((!this.vIsLocation && !this.vIsGroup) || this.config.isPrior) && this.config.isOn
|
||||
},
|
||||
changeAllowDomains: function (domains) {
|
||||
},
|
||||
changeDenyDomains: function (domains) {
|
||||
}
|
||||
},
|
||||
template: `<div>
|
||||
@@ -63,6 +69,13 @@ Vue.component("http-referers-config-box", {
|
||||
<p class="comment">允许的其他来源域名列表,比如<code-label>example.com</code-label>、<code-label>*.example.com</code-label>。单个星号<code-label>*</code-label>表示允许所有域名。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>禁止的来源域名</td>
|
||||
<td>
|
||||
<values-box :values="config.denyDomains" @change="changeDenyDomains"></values-box>
|
||||
<p class="comment">禁止的来源域名列表,比如<code-label>example.org</code-label>、<code-label>*.example.org</code-label>;除了这些禁止的来源域名外,其他域名都会被允许,除非限定了允许的来源域名。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="ui margin"></div>
|
||||
|
||||
Reference in New Issue
Block a user