update
Browse files
app.lua
CHANGED
|
@@ -16,12 +16,13 @@ end
|
|
| 16 |
|
| 17 |
ngx.say('uri: ',uri)
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
ngx.say("api_version: ", api_version)
|
| 27 |
ngx.say("api_pxoxy_pass_url_indicator: ", api_pxoxy_pass_url_indicator)
|
|
|
|
| 16 |
|
| 17 |
ngx.say('uri: ',uri)
|
| 18 |
|
| 19 |
+
local api_version, api_pxoxy_pass_url_indicator = path:match("/([^/]+)/(.*)")
|
| 20 |
+
|
| 21 |
+
-- local version_match = uri:match("([^/]+)/(.+)")
|
| 22 |
+
-- if version_match then
|
| 23 |
+
-- api_version = version_match[1] -- 提取第一个部分
|
| 24 |
+
-- api_pxoxy_pass_url_indicator = version_match[2] -- 提取剩余部分
|
| 25 |
+
-- end
|
| 26 |
|
| 27 |
ngx.say("api_version: ", api_version)
|
| 28 |
ngx.say("api_pxoxy_pass_url_indicator: ", api_pxoxy_pass_url_indicator)
|