Documentation ¶
Index ¶
- Constants
- Variables
- func ActionFileCheck(conf ActionFile) error
- func ActionFileListCheck(conf *ActionFileList) error
- func DoHeader(req *bfe_basic.Request, headerType int, ruleList *RuleList)
- func HeaderActionDo(h *bfe_http.Header, cmd string, headerName string, value string)
- func HeaderActionsDo(req *bfe_basic.Request, headerType int, actions []Action)
- func HeaderConfCheck(conf HeaderConfFile) error
- func HeaderRuleCheck(conf HeaderRuleFile) error
- func ProductRulesCheck(conf *ProductRulesFile) error
- func ReqCookieActionDo(req *bfe_basic.Request, action Action)
- func RspCookieActionDo(req *bfe_basic.Request, action Action)
- func RuleListCheck(conf *RuleFileList) error
- type Action
- type ActionFile
- type ActionFileList
- type ConfModHeader
- type HeaderConf
- type HeaderConfFile
- type HeaderRule
- type HeaderRuleFile
- type HeaderTable
- type HeaderValueHandler
- type ModuleHeader
- type ProductRules
- type ProductRulesFile
- type RuleFileList
- type RuleList
Constants ¶
View Source
const ( ReqCookieSet = "REQ_COOKIE_SET" ReqCookieDel = "REQ_COOKIE_DEL" RspCookieSet = "RSP_COOKIE_SET" RspCookieDel = "RSP_COOKIE_DEL" )
View Source
const ( ReqHeader = iota RspHeader TotalType )
View Source
const (
GlobalProduct = "global"
)
View Source
const (
Unknown = "unknown"
)
Variables ¶
View Source
var VariableHandlers = map[string]HeaderValueHandler{
"bfe_client_ip": getClientIp,
"bfe_client_port": getClientPort,
"bfe_request_host": getRequestHost,
"bfe_session_id": getSessionId,
"bfe_log_id": getLogId,
"bfe_cip": getClientIp,
"bfe_vip": getBfeVip,
"bfe_bip": getBfeBip,
"bfe_rip": getBfeRip,
"bfe_server_name": getBfeServerName,
"bfe_cluster": getBfeCluster,
"bfe_backend_info": getBfeBackendInfo,
"bfe_ssl_resume": getBfeSslResume,
"bfe_ssl_cipher": getBfeSslCipher,
"bfe_ssl_version": getBfeSslVersion,
"bfe_ssl_ja3_raw": getBfeSslJa3Raw,
"bfe_ssl_ja3_hash": getBfeSslJa3Hash,
"bfe_protocol": getBfeProtocol,
"client_cert_serial_number": getClientCertSerialNumber,
"client_cert_subject_title": getClientCertSubjectTitle,
"client_cert_subject_common_name": getClientCertSubjectCommonName,
"client_cert_subject_organization": getClientCertSubjectOrganization,
"client_cert_subject_organizational_unit": getClientCertSubjectOrganizationalUnit,
"client_cert_subject_province": getClientCertSubjectProvince,
"client_cert_subject_country": getClientCertSubjectCountry,
"client_cert_subject_locality": getClientCertSubjectLocality,
"bfe_http2_fingerprint": getBfeHTTP2Fingerprint,
"bfe_client_geo_country_iso_code": getClientGeoCountryIsoCode,
"bfe_client_geo_subdivision_iso_code": getClientGeoSubdivisionIsoCode,
"bfe_client_geo_city_name": getClientGeoCityName,
"bfe_client_geo_latitude": getClientGeoLatitude,
"bfe_client_geo_longitude": getClientGeoLongitude,
}
Functions ¶
func ActionFileCheck ¶
func ActionFileCheck(conf ActionFile) error
func ActionFileListCheck ¶
func ActionFileListCheck(conf *ActionFileList) error
func HeaderActionDo ¶
func HeaderActionsDo ¶
func HeaderConfCheck ¶
func HeaderConfCheck(conf HeaderConfFile) error
func HeaderRuleCheck ¶
func HeaderRuleCheck(conf HeaderRuleFile) error
func ProductRulesCheck ¶
func ProductRulesCheck(conf *ProductRulesFile) error
func ReqCookieActionDo ¶
func RspCookieActionDo ¶
func RuleListCheck ¶
func RuleListCheck(conf *RuleFileList) error
Types ¶
type ActionFile ¶
type ActionFileList ¶
type ActionFileList []ActionFile
type ConfModHeader ¶
type ConfModHeader struct { Basic struct { DataPath string // path of config data (mod_header) DisableDefaultHeader bool // disable default header or not } Log struct { OpenDebug bool } }
func (*ConfModHeader) Check ¶
func (cfg *ConfModHeader) Check(confRoot string) error
type HeaderConf ¶
type HeaderConf struct { Version string // version of the config Config ProductRules // product rules for header }
func HeaderConfLoad ¶
func HeaderConfLoad(filename string) (HeaderConf, error)
HeaderConfLoad loads config of header from file.
type HeaderConfFile ¶
type HeaderConfFile struct { Version *string // version of the config Config *ProductRulesFile }
type HeaderRule ¶
type HeaderRuleFile ¶
type HeaderRuleFile struct { Cond *string // condition for header Actions *ActionFileList // list of actions Last *bool // if true, not to check the next rule in the list if }
type HeaderTable ¶
type HeaderTable struct {
// contains filtered or unexported fields
}
func NewHeaderTable ¶
func NewHeaderTable() *HeaderTable
func (*HeaderTable) Update ¶
func (t *HeaderTable) Update(conf HeaderConf)
type HeaderValueHandler ¶
type ModuleHeader ¶
type ModuleHeader struct {
// contains filtered or unexported fields
}
func NewModuleHeader ¶
func NewModuleHeader() *ModuleHeader
func (*ModuleHeader) Init ¶
func (m *ModuleHeader) Init(cbs *bfe_module.BfeCallbacks, whs *web_monitor.WebHandlers, cr string) error
func (*ModuleHeader) Name ¶
func (m *ModuleHeader) Name() string
type ProductRules ¶
type ProductRulesFile ¶
type ProductRulesFile map[string]*RuleFileList // product => list of header rules
type RuleFileList ¶
type RuleFileList []HeaderRuleFile
type RuleList ¶
type RuleList []HeaderRule
Click to show internal directories.
Click to hide internal directories.