geqintan commited on
Commit
07fbb37
·
1 Parent(s): 1eed954
Files changed (1) hide show
  1. nginx.conf +5 -1
nginx.conf CHANGED
@@ -25,7 +25,11 @@ http {
25
  -- ngx.var.proxy_pass = ngx.var.uri
26
  ngx.var.upstream = 'https://baidu.com';
27
  }
28
- proxy_pass $ngx.shared.upstream_dict["upstream"];
 
 
 
 
29
  }
30
  }
31
  }
 
25
  -- ngx.var.proxy_pass = ngx.var.uri
26
  ngx.var.upstream = 'https://baidu.com';
27
  }
28
+ content_by_lua_block {
29
+ local upstream_dict = ngx.shared.upstream_dict
30
+ ngx.var.upstream = upstream_dict:get("upstream")
31
+ }
32
+ proxy_pass $upstream;
33
  }
34
  }
35
  }