Initial commit (code only without large binaries)
This commit is contained in:
34
EdgeCommon/pkg/serverconfigs/http_page_optimization_html.go
Normal file
34
EdgeCommon/pkg/serverconfigs/http_page_optimization_html.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package serverconfigs
|
||||
|
||||
type HTTPHTMLOptimizationConfig struct {
|
||||
HTTPBaseOptimizationConfig
|
||||
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
|
||||
KeepComments bool `yaml:"keepComments" json:"keepComments"`
|
||||
KeepConditionalComments bool `yaml:"keepConditionalComments" json:"keepConditionalComments"`
|
||||
KeepDefaultAttrVals bool `yaml:"keepDefaultAttrVals" json:"keepDefaultAttrVals"`
|
||||
KeepDocumentTags bool `yaml:"keepDocumentTags" json:"keepDocumentTags"`
|
||||
KeepEndTags bool `yaml:"keepEndTags" json:"keepEndTags"`
|
||||
KeepQuotes bool `yaml:"keepQuotes" json:"keepQuotes"`
|
||||
KeepWhitespace bool `yaml:"keepWhitespace" json:"keepWhitespace"`
|
||||
}
|
||||
|
||||
func NewHTTPHTMLOptimizationConfig() *HTTPHTMLOptimizationConfig {
|
||||
return &HTTPHTMLOptimizationConfig{
|
||||
KeepDefaultAttrVals: true,
|
||||
KeepDocumentTags: true,
|
||||
KeepEndTags: true,
|
||||
KeepQuotes: true,
|
||||
}
|
||||
}
|
||||
|
||||
func (this *HTTPHTMLOptimizationConfig) Init() error {
|
||||
err := this.HTTPBaseOptimizationConfig.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user