Lines 1084-1089
Link Here
|
1084 |
ps->proxies = apr_array_make(p, 10, sizeof(struct proxy_remote)); |
1084 |
ps->proxies = apr_array_make(p, 10, sizeof(struct proxy_remote)); |
1085 |
ps->aliases = apr_array_make(p, 10, sizeof(struct proxy_alias)); |
1085 |
ps->aliases = apr_array_make(p, 10, sizeof(struct proxy_alias)); |
1086 |
ps->noproxies = apr_array_make(p, 10, sizeof(struct noproxy_entry)); |
1086 |
ps->noproxies = apr_array_make(p, 10, sizeof(struct noproxy_entry)); |
|
|
1087 |
ps->allowproxies = apr_array_make(p, 10, sizeof(struct noproxy_entry)); |
1087 |
ps->dirconn = apr_array_make(p, 10, sizeof(struct dirconn_entry)); |
1088 |
ps->dirconn = apr_array_make(p, 10, sizeof(struct dirconn_entry)); |
1088 |
ps->workers = apr_array_make(p, 10, sizeof(proxy_worker)); |
1089 |
ps->workers = apr_array_make(p, 10, sizeof(proxy_worker)); |
1089 |
ps->balancers = apr_array_make(p, 10, sizeof(proxy_balancer)); |
1090 |
ps->balancers = apr_array_make(p, 10, sizeof(proxy_balancer)); |
Lines 1121-1126
Link Here
|
1121 |
ps->sec_proxy = apr_array_append(p, base->sec_proxy, overrides->sec_proxy); |
1122 |
ps->sec_proxy = apr_array_append(p, base->sec_proxy, overrides->sec_proxy); |
1122 |
ps->aliases = apr_array_append(p, base->aliases, overrides->aliases); |
1123 |
ps->aliases = apr_array_append(p, base->aliases, overrides->aliases); |
1123 |
ps->noproxies = apr_array_append(p, base->noproxies, overrides->noproxies); |
1124 |
ps->noproxies = apr_array_append(p, base->noproxies, overrides->noproxies); |
|
|
1125 |
ps->allowproxies = apr_array_append(p, base->allowproxies, overrides->allowproxies); |
1124 |
ps->dirconn = apr_array_append(p, base->dirconn, overrides->dirconn); |
1126 |
ps->dirconn = apr_array_append(p, base->dirconn, overrides->dirconn); |
1125 |
ps->workers = apr_array_append(p, base->workers, overrides->workers); |
1127 |
ps->workers = apr_array_append(p, base->workers, overrides->workers); |
1126 |
ps->balancers = apr_array_append(p, base->balancers, overrides->balancers); |
1128 |
ps->balancers = apr_array_append(p, base->balancers, overrides->balancers); |
Lines 2067-2072
Link Here
|
2067 |
RSRC_CONF|ACCESS_CONF, "Domain rewrite rule for proxying cookies"), |
2069 |
RSRC_CONF|ACCESS_CONF, "Domain rewrite rule for proxying cookies"), |
2068 |
AP_INIT_ITERATE("ProxyBlock", set_proxy_exclude, NULL, RSRC_CONF, |
2070 |
AP_INIT_ITERATE("ProxyBlock", set_proxy_exclude, NULL, RSRC_CONF, |
2069 |
"A list of names, hosts or domains to which the proxy will not connect"), |
2071 |
"A list of names, hosts or domains to which the proxy will not connect"), |
|
|
2072 |
AP_INIT_ITERATE("ProxyAllow", set_proxy_include, NULL, RSRC_CONF, |
2073 |
"A list of names, hosts or domains to which the proxy will connect"), |
2070 |
AP_INIT_TAKE1("ProxyReceiveBufferSize", set_recv_buffer_size, NULL, RSRC_CONF, |
2074 |
AP_INIT_TAKE1("ProxyReceiveBufferSize", set_recv_buffer_size, NULL, RSRC_CONF, |
2071 |
"Receive buffer size for outgoing HTTP and FTP connections in bytes"), |
2075 |
"Receive buffer size for outgoing HTTP and FTP connections in bytes"), |
2072 |
AP_INIT_TAKE1("ProxyIOBufferSize", set_io_buffer_size, NULL, RSRC_CONF, |
2076 |
AP_INIT_TAKE1("ProxyIOBufferSize", set_io_buffer_size, NULL, RSRC_CONF, |
Lines 2157-2162
Link Here
|
2157 |
return OK; |
2161 |
return OK; |
2158 |
} |
2162 |
} |
2159 |
|
2163 |
|
|
|
2164 |
static const char * |
2165 |
set_proxy_include(cmd_parms *parms, void *dummy, const char *arg) |
2166 |
{ |
2167 |
server_rec *s = parms->server; |
2168 |
proxy_server_conf *conf = |
2169 |
ap_get_module_config(s->module_config, &proxy_module); |
2170 |
struct noproxy_entry *new; |
2171 |
struct noproxy_entry *list = (struct noproxy_entry *) conf->allowproxies->elts; |
2172 |
struct apr_sockaddr_t *addr; |
2173 |
int found = 0; |
2174 |
int i; |
2175 |
|
2176 |
/* Don't duplicate entries */ |
2177 |
for (i = 0; i < conf->allowproxies->nelts; i++) { |
2178 |
if (strcasecmp(arg, list[i].name) == 0) { /* ignore case for host names */ |
2179 |
found = 1; |
2180 |
} |
2181 |
} |
2182 |
|
2183 |
if (!found) { |
2184 |
new = apr_array_push(conf->allowproxies); |
2185 |
new->name = arg; |
2186 |
if (APR_SUCCESS == apr_sockaddr_info_get(&addr, new->name, APR_UNSPEC, 0, 0, parms->pool)) { |
2187 |
new->addr = addr; |
2188 |
} |
2189 |
else { |
2190 |
new->addr = NULL; |
2191 |
} |
2192 |
} |
2193 |
return NULL; |
2194 |
} |
2195 |
|
2160 |
/* |
2196 |
/* |
2161 |
* proxy Extension to mod_status |
2197 |
* proxy Extension to mod_status |
2162 |
*/ |
2198 |
*/ |