mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Simplify http attrabute matching
In the past, we use Starlark script, it is over engineered and barely used. By switching to simple key value string contains logic we can reduce core size about 0.7MB
This commit is contained in:
parent
d11d72be6c
commit
bf4b1fab3c
8 changed files with 103 additions and 157 deletions
|
@ -308,7 +308,9 @@ func TestRoutingRule(t *testing.T) {
|
|||
{
|
||||
rule: &RoutingRule{
|
||||
Protocol: []string{"http"},
|
||||
Attributes: "attrs[':path'].startswith('/test')",
|
||||
Attributes: map[string]string {
|
||||
":path": "/test",
|
||||
},
|
||||
},
|
||||
test: []ruleTest{
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue