You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,8 @@ The attributes of each element may contain these:
86
86
87
87
|name |option |description|example|
88
88
|:-------- |:--------|:-----------|:-----|
89
-
|paths |required|A list of client request uri. The default is a full match, but if the end of the path is `*`, it means that this is a prefix path. For example `/foo*`, it'll match `/foo/bar` or `/foo/glo/grey` etc.|{"/", "/aa", "/bb"}|
89
+
|paths |required|A list of client request path. The default is a full match, but if the end of the path is `*`, it means that this is a prefix path. For example `/foo*`, it'll match `/foo/bar` or `/foo/glo/grey` etc.|{"/", "/aa", "/bb"}|
90
90
|hosts |option |A list of client request host, not only supports normal domain name, but also supports wildcard name.|{"foo.com", "*.bar.com"}|
91
-
|uris |option |A list of client request uris, not only supports static uri, but also supports prefix uri.|{"/foo", "/bar/*"}|
92
91
|remote_addrs|option |A list of client remote address(IPv4 and IPv6), and we can use CIDR format, eg `192.168.1.0/24`.|{"127.0.0.1", "192.0.0.0/8", "::1", "fe80::/32"}|
93
92
|methods |option |A list of method name. Here is full valid method list: "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT" and "TRACE".|{"GET", "POST"}|
94
93
|vars |option |A list of `{var, operator, val}`. For example: {{var, operator, val}, {var, operator, val}, ...}, `{"arg_name", "==", "json"}` means the value of argument `name` expect to `json`. Here is the full [Operator List](#operator-list).|{{"arg_name", "==", "json"}, {"arg_age", ">", 18}}|
@@ -175,7 +174,7 @@ local rx = radix.new({
175
174
*`method`: optional, method name of client request.
176
175
*`host`: optional, client request host.
177
176
*`remote_addr`: optional, client remote address like `192.168.1.100`.
178
-
*`uri`: optional, client request uri.
177
+
*`paths`: optional, a list of client request path.
179
178
*`vars`: optional, a Lua table to fetch variable, default value is `ngx.var` to fetch Ningx builtin variable.
180
179
181
180
Matchs the route by `method`, `path` and `host` etc, and return `metadata` if successful.
@@ -195,7 +194,6 @@ local metadata = rx:match(ngx.var.uri, {...})
195
194
*`method`: optional, method name of client request.
196
195
*`host`: optional, client request host.
197
196
*`remote_addr`: optional, client remote address like `192.168.1.100`.
198
-
*`uri`: optional, client request uri.
199
197
*`vars`: optional, a Lua table to fetch variable, default value is `ngx.var` to fetch Ningx builtin variable.
200
198
201
199
Matchs the route by `method`, `path` and `host` etc, and call `handler` function if successful.
0 commit comments