feature: added patch nginx-1.4.3-proxy_host_port_vars to make $proxy_host and $proxy_port accessible for dynamic languages like Lua and Perl.

pull/35/head
Yichun Zhang (agentzh) 11 years ago
parent aac5d5e49e
commit f35f66a487

@ -0,0 +1,15 @@
--- nginx-1.4.3/src/http/modules/ngx_http_proxy_module.c 2013-10-08 05:07:14.000000000 -0700
+++ nginx-1.4.3-patched/src/http/modules/ngx_http_proxy_module.c 2013-10-27 15:29:41.619378592 -0700
@@ -602,10 +602,10 @@ static ngx_keyval_t ngx_http_proxy_cach
static ngx_http_variable_t ngx_http_proxy_vars[] = {
{ ngx_string("proxy_host"), NULL, ngx_http_proxy_host_variable, 0,
- NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE|NGX_HTTP_VAR_NOHASH, 0 },
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("proxy_port"), NULL, ngx_http_proxy_port_variable, 0,
- NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE|NGX_HTTP_VAR_NOHASH, 0 },
+ NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("proxy_add_x_forwarded_for"), NULL,
ngx_http_proxy_add_x_forwarded_for_variable, 0, NGX_HTTP_VAR_NOHASH, 0 },

@ -195,6 +195,10 @@ echo "$info_txt applying the cache_lock_hang_in_subreq patch for nginx $ver"
patch -p1 < $root/patches/nginx-$ver-cache_lock_hang_in_subreq.patch || exit 1
echo
echo "$info_txt applying the proxy_host_port_vars patch for nginx $ver"
patch -p1 < $root/patches/nginx-$ver-proxy_host_port_vars.patch || exit 1
echo
rm -f *.patch || exit 1
cd .. || exit 1

Loading…
Cancel
Save