update
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
}
|