geqintan commited on
Commit
e328942
·
1 Parent(s): 1ff481e
Files changed (1) hide show
  1. app.lua +7 -8
app.lua CHANGED
@@ -14,15 +14,14 @@ if uri == '/' then -- uri为 / ,退出运行
14
  ngx.exit(ngx.HTTP_OK)
15
  end
16
 
17
- ngx.say('uri: ',uri)
18
-
19
  local api_version, api_pxoxy_pass_url_indicator = uri: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)
 
 
 
 
 
 
 
 
14
  ngx.exit(ngx.HTTP_OK)
15
  end
16
 
 
 
17
  local api_version, api_pxoxy_pass_url_indicator = uri:match("/([^/]+)/(.*)")
18
 
 
 
 
 
 
 
19
  ngx.say("api_version: ", api_version)
20
  ngx.say("api_pxoxy_pass_url_indicator: ", api_pxoxy_pass_url_indicator)
21
+ pass_url = api_pxoxy_pass_url_indicator
22
+ pass_url = pass_url:gsub("http/", "http://")
23
+ pass_url = pass_url:gsub("https/", "https://")
24
+ ngx.say("pass_url: ", pass_url)
25
+
26
+
27
+