增加防盗链功能

This commit is contained in:
GoEdgeLab
2022-09-22 16:33:46 +08:00
parent ce9bf28274
commit 1ea0acd027
4 changed files with 128 additions and 35 deletions

View File

@@ -38,43 +38,45 @@ type HTTPWeb struct {
RequestLimit dbs.JSON `field:"requestLimit"` // 请求限制
RequestScripts dbs.JSON `field:"requestScripts"` // 请求脚本
Uam dbs.JSON `field:"uam"` // UAM设置
Referers dbs.JSON `field:"referers"` // 防盗链设置
}
type HTTPWebOperator struct {
Id interface{} // ID
IsOn interface{} // 是否启用
TemplateId interface{} // 模版ID
AdminId interface{} // 管理员ID
UserId interface{} // 用户ID
State interface{} // 状态
CreatedAt interface{} // 创建时间
Root interface{} // 根目录
Charset interface{} // 字符集
Shutdown interface{} // 临时关闭页面配置
Pages interface{} // 特殊页面
RedirectToHttps interface{} // 跳转到HTTPS设置
Indexes interface{} // 首页文件列表
MaxRequestBodySize interface{} // 最大允许的请求内容尺寸
RequestHeader interface{} // 请求Header配置
ResponseHeader interface{} // 响应Header配置
AccessLog interface{} // 访问日志配置
Stat interface{} // 统计配置
Gzip interface{} // Gzip配置v0.3.2弃用)
Compression interface{} // 压缩配置
Cache interface{} // 缓存配置
Firewall interface{} // 防火墙设置
Locations interface{} // 路由规则配置
Websocket interface{} // Websocket设置
RewriteRules interface{} // 重写规则配置
HostRedirects interface{} // 域名跳转
Fastcgi interface{} // Fastcgi配置
Auth interface{} // 认证策略配置
Webp interface{} // WebP配置
RemoteAddr interface{} // 客户端IP配置
MergeSlashes interface{} // 是否合并路径中的斜杠
RequestLimit interface{} // 请求限制
RequestScripts interface{} // 请求脚本
Uam interface{} // UAM设置
Id any // ID
IsOn any // 是否启用
TemplateId any // 模版ID
AdminId any // 管理员ID
UserId any // 用户ID
State any // 状态
CreatedAt any // 创建时间
Root any // 根目录
Charset any // 字符集
Shutdown any // 临时关闭页面配置
Pages any // 特殊页面
RedirectToHttps any // 跳转到HTTPS设置
Indexes any // 首页文件列表
MaxRequestBodySize any // 最大允许的请求内容尺寸
RequestHeader any // 请求Header配置
ResponseHeader any // 响应Header配置
AccessLog any // 访问日志配置
Stat any // 统计配置
Gzip any // Gzip配置v0.3.2弃用)
Compression any // 压缩配置
Cache any // 缓存配置
Firewall any // 防火墙设置
Locations any // 路由规则配置
Websocket any // Websocket设置
RewriteRules any // 重写规则配置
HostRedirects any // 域名跳转
Fastcgi any // Fastcgi配置
Auth any // 认证策略配置
Webp any // WebP配置
RemoteAddr any // 客户端IP配置
MergeSlashes any // 是否合并路径中的斜杠
RequestLimit any // 请求限制
RequestScripts any // 请求脚本
Uam any // UAM设置
Referers any // 防盗链设置
}
func NewHTTPWebOperator() *HTTPWebOperator {