geqintan commited on
Commit
9f4cad4
Β·
1 Parent(s): bbf08b3
Files changed (1) hide show
  1. app.lua +8 -9
app.lua CHANGED
@@ -12,17 +12,16 @@ local api_pxoxy_pass_url_indicator = ''
12
 
13
  -- ζε–η‰ˆζœ¬ε·ε’Œ proxy_pass url ζ ‡θ―†
14
  if uri == '/' then
15
- ngx.say("uri = /")
16
  ngx.exit(ngx.HTTP_OK)
 
 
 
 
 
 
17
  else
18
- local version_match = string.match(uri, "^(v%d+)/(.*)")
19
- if version_match then
20
- api_version = version_match[1]
21
- api_pxoxy_pass_url_indicator = version_match[2]
22
- else
23
- api_version = ''
24
- api_pxoxy_pass_url_indicator = ''
25
- end
26
  end
27
 
28
  ngx.say("api_version: ", api_version)
 
12
 
13
  -- ζε–η‰ˆζœ¬ε·ε’Œ proxy_pass url ζ ‡θ―†
14
  if uri == '/' then
 
15
  ngx.exit(ngx.HTTP_OK)
16
+ end
17
+
18
+ local version_match = string.match(uri, "^(v%d+)/(.*)")
19
+ if version_match then
20
+ api_version = version_match[1]
21
+ api_pxoxy_pass_url_indicator = version_match[2]
22
  else
23
+ api_version = ''
24
+ api_pxoxy_pass_url_indicator = ''
 
 
 
 
 
 
25
  end
26
 
27
  ngx.say("api_version: ", api_version)