lua-resty-radixtree icon indicating copy to clipboard operation
lua-resty-radixtree copied to clipboard

Can support begin xxx*.xxx.com?

Open kongjun01 opened this issue 3 years ago • 4 comments

my route host is engine*.cacazhu.com , Can support begin xxx*.xxx.com?

kongjun01 avatar Jan 18 '22 05:01 kongjun01

if you want to use the regex, you can take a look at this way:

local radix = require("resty.radixtree")
local rx = radix.new({
    {
        paths = {"/bb*"},
        vars = {
            {"host", "~~", "xxx\\w+.xxx.com"}
        }
    }
})

membphis avatar Jan 18 '22 16:01 membphis

Maybe we could add this tip to our docs? @membphis @kongjun01

juzhiyuan avatar Feb 06 '22 12:02 juzhiyuan

Maybe we could add this tip to our docs? @membphis @kongjun01

@kongjun01 would you like to submit a PR?

membphis avatar Feb 08 '22 05:02 membphis

My pleasure.

kongjun01 avatar Feb 15 '22 09:02 kongjun01