2024-05-17 18:28:59 +08:00
|
|
|
// Copyright 2021 GoEdge CDN goedge.cdn@gmail.com. All rights reserved.
|
2021-06-17 21:18:05 +08:00
|
|
|
|
|
|
|
|
package serverconfigs
|
|
|
|
|
|
|
|
|
|
import "net/http"
|
|
|
|
|
|
|
|
|
|
// HTTPAuthMethodInterface HTTP认证接口定义
|
|
|
|
|
type HTTPAuthMethodInterface interface {
|
|
|
|
|
// Init 初始化
|
2022-08-30 11:24:07 +08:00
|
|
|
Init(params map[string]any) error
|
|
|
|
|
|
|
|
|
|
// MatchRequest 是否匹配请求
|
|
|
|
|
MatchRequest(req *http.Request) bool
|
2021-06-17 21:18:05 +08:00
|
|
|
|
|
|
|
|
// Filter 过滤
|
2022-08-30 11:24:07 +08:00
|
|
|
Filter(req *http.Request, subReqFunc func(subReq *http.Request) (status int, err error), formatter func(string) string) (ok bool, newURI string, uriChanged bool, err error)
|
|
|
|
|
|
|
|
|
|
// SetExts 设置扩展名
|
|
|
|
|
SetExts(exts []string)
|
|
|
|
|
|
|
|
|
|
// SetDomains 设置域名
|
|
|
|
|
SetDomains(domains []string)
|
2021-06-17 21:18:05 +08:00
|
|
|
}
|