mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-01-03 17:46:36 +08:00
增加字符编码/HTTP Header管理
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
package serverconfigs
|
||||
|
||||
type HTTPWebConfig struct {
|
||||
Id int64 `yaml:"id" json:"id"` // ID
|
||||
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用
|
||||
Locations []*LocationConfig `yaml:"locations" json:"locations"` // 路径规则 TODO
|
||||
Gzip *HTTPGzipConfig `yaml:"gzip" json:"gzip"` // Gzip配置
|
||||
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
||||
|
||||
// 本地静态资源配置
|
||||
Root string `yaml:"root" json:"root"` // 资源根目录 TODO
|
||||
type HTTPWebConfig struct {
|
||||
Id int64 `yaml:"id" json:"id"` // ID
|
||||
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用
|
||||
Locations []*LocationConfig `yaml:"locations" json:"locations"` // 路径规则 TODO
|
||||
Gzip *HTTPGzipConfig `yaml:"gzip" json:"gzip"` // Gzip配置
|
||||
Charset string `yaml:"charset" json:"charset"` // 字符编码
|
||||
Shutdown *HTTPShutdownConfig `yaml:"shutdown" json:"shutdown"` // 临时关闭配置
|
||||
Pages []*HTTPPageConfig `yaml:"pages" json:"pages"` // 特殊页面配置
|
||||
RedirectToHttps *HTTPRedirectToHTTPSConfig `yaml:"redirectToHttps" json:"redirectToHttps"` // 是否自动跳转到Https
|
||||
Root string `yaml:"root" json:"root"` // 资源根目录 TODO
|
||||
Indexes []string `yaml:"indexes" json:"indexes"` // 默认首页文件
|
||||
MaxRequestBodySize string `yaml:"maxRequestBodySize" json:"maxRequestBodySize"` // 请求body最大尺寸
|
||||
RequestHeaders *shared.HTTPHeaderPolicy `yaml:"requestHeaders" json:"requestHeaders"` // 请求Header
|
||||
ResponseHeaders *shared.HTTPHeaderPolicy `yaml:"responseHeaders" json:"responseHeaders"` // 响应Header`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user