mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-01-04 01:56:34 +08:00
实现websocket基本功能
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package serverconfigs
|
||||
|
||||
import "github.com/TeaOSLab/EdgeCommon/pkg/configutils"
|
||||
|
||||
// Web文档目录配置
|
||||
type HTTPRootConfig struct {
|
||||
IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否优先
|
||||
@@ -9,9 +11,17 @@ type HTTPRootConfig struct {
|
||||
StripPrefix string `yaml:"stripPrefix" json:"stripPrefix"` // 去除前缀
|
||||
DecodePath bool `yaml:"decodePath" json:"decodePath"` // 是否对请求路径进行解码
|
||||
IsBreak bool `yaml:"isBreak" json:"isBreak"` // 找不到文件的情况下是否终止
|
||||
|
||||
hasVariables bool
|
||||
}
|
||||
|
||||
// 初始化
|
||||
func (ths *HTTPRootConfig) Init() error {
|
||||
func (this *HTTPRootConfig) Init() error {
|
||||
this.hasVariables = configutils.HasVariables(this.Dir)
|
||||
return nil
|
||||
}
|
||||
|
||||
// 判断是否有变量
|
||||
func (this *HTTPRootConfig) HasVariables() bool {
|
||||
return this.hasVariables
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user