mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-23 05:59:49 +00:00
allow empty route type
default field
This commit is contained in:
parent
f51bf98714
commit
9becf02316
@ -636,7 +636,7 @@ func ParseRule(msg json.RawMessage) (*router.RoutingRule, error) {
|
||||
if err != nil {
|
||||
return nil, newError("invalid router rule").Base(err)
|
||||
}
|
||||
if strings.EqualFold(rawRule.Type, "field") {
|
||||
if rawRule.Type == "" || strings.EqualFold(rawRule.Type, "field") {
|
||||
fieldrule, err := parseFieldRule(msg)
|
||||
if err != nil {
|
||||
return nil, newError("invalid field rule").Base(err)
|
||||
|
Loading…
Reference in New Issue
Block a user