Lines 477-482
Link Here
|
477 |
ps->aliases = apr_array_make(p, 10, sizeof(struct proxy_alias)); |
477 |
ps->aliases = apr_array_make(p, 10, sizeof(struct proxy_alias)); |
478 |
ps->raliases = apr_array_make(p, 10, sizeof(struct proxy_alias)); |
478 |
ps->raliases = apr_array_make(p, 10, sizeof(struct proxy_alias)); |
479 |
ps->noproxies = apr_array_make(p, 10, sizeof(struct noproxy_entry)); |
479 |
ps->noproxies = apr_array_make(p, 10, sizeof(struct noproxy_entry)); |
|
|
480 |
ps->onlyproxies = apr_array_make(p, 10, sizeof(struct noproxy_entry)); |
480 |
ps->dirconn = apr_array_make(p, 10, sizeof(struct dirconn_entry)); |
481 |
ps->dirconn = apr_array_make(p, 10, sizeof(struct dirconn_entry)); |
481 |
ps->allowed_connect_ports = apr_array_make(p, 10, sizeof(int)); |
482 |
ps->allowed_connect_ports = apr_array_make(p, 10, sizeof(int)); |
482 |
ps->domain = NULL; |
483 |
ps->domain = NULL; |
Lines 512-517
Link Here
|
512 |
ps->aliases = apr_array_append(p, base->aliases, overrides->aliases); |
513 |
ps->aliases = apr_array_append(p, base->aliases, overrides->aliases); |
513 |
ps->raliases = apr_array_append(p, base->raliases, overrides->raliases); |
514 |
ps->raliases = apr_array_append(p, base->raliases, overrides->raliases); |
514 |
ps->noproxies = apr_array_append(p, base->noproxies, overrides->noproxies); |
515 |
ps->noproxies = apr_array_append(p, base->noproxies, overrides->noproxies); |
|
|
516 |
ps->onlyproxies = apr_array_append(p, base->onlyproxies, overrides->onlyproxies); |
515 |
ps->dirconn = apr_array_append(p, base->dirconn, overrides->dirconn); |
517 |
ps->dirconn = apr_array_append(p, base->dirconn, overrides->dirconn); |
516 |
ps->allowed_connect_ports = apr_array_append(p, base->allowed_connect_ports, overrides->allowed_connect_ports); |
518 |
ps->allowed_connect_ports = apr_array_append(p, base->allowed_connect_ports, overrides->allowed_connect_ports); |
517 |
|
519 |
|
Lines 709-714
Link Here
|
709 |
return NULL; |
711 |
return NULL; |
710 |
} |
712 |
} |
711 |
|
713 |
|
|
|
714 |
static const char * |
715 |
set_proxy_include(cmd_parms *parms, void *dummy, const char *arg) |
716 |
{ |
717 |
server_rec *s = parms->server; |
718 |
proxy_server_conf *conf = |
719 |
ap_get_module_config(s->module_config, &proxy_module); |
720 |
struct noproxy_entry *new; |
721 |
struct noproxy_entry *list = (struct noproxy_entry *) conf->onlyproxies->elts; |
722 |
struct apr_sockaddr_t *addr; |
723 |
int found = 0; |
724 |
int i; |
725 |
|
726 |
/* Don't duplicate entries */ |
727 |
for (i = 0; i < conf->onlyproxies->nelts; i++) { |
728 |
if (apr_strnatcasecmp(arg, list[i].name) == 0) { /* ignore case for host names */ |
729 |
found = 1; |
730 |
} |
731 |
} |
732 |
|
733 |
if (!found) { |
734 |
new = apr_array_push(conf->onlyproxies); |
735 |
new->name = arg; |
736 |
if (APR_SUCCESS == apr_sockaddr_info_get(&addr, new->name, APR_UNSPEC, 0, 0, parms->pool)) { |
737 |
new->addr = addr; |
738 |
} |
739 |
else { |
740 |
new->addr = NULL; |
741 |
} |
742 |
} |
743 |
return NULL; |
744 |
} |
745 |
|
712 |
/* |
746 |
/* |
713 |
* Set the ports CONNECT can use |
747 |
* Set the ports CONNECT can use |
714 |
*/ |
748 |
*/ |
Lines 1042-1047
Link Here
|
1042 |
"a virtual path and a URL"), |
1076 |
"a virtual path and a URL"), |
1043 |
AP_INIT_TAKE12("ProxyPassReverse", add_pass_reverse, NULL, RSRC_CONF|ACCESS_CONF, |
1077 |
AP_INIT_TAKE12("ProxyPassReverse", add_pass_reverse, NULL, RSRC_CONF|ACCESS_CONF, |
1044 |
"a virtual path and a URL for reverse proxy behaviour"), |
1078 |
"a virtual path and a URL for reverse proxy behaviour"), |
|
|
1079 |
AP_INIT_ITERATE("ProxyAllow", set_proxy_include, NULL, RSRC_CONF, |
1080 |
"A list of names, hosts or domains to which the proxy may connect"), |
1045 |
AP_INIT_ITERATE("ProxyBlock", set_proxy_exclude, NULL, RSRC_CONF, |
1081 |
AP_INIT_ITERATE("ProxyBlock", set_proxy_exclude, NULL, RSRC_CONF, |
1046 |
"A list of names, hosts or domains to which the proxy will not connect"), |
1082 |
"A list of names, hosts or domains to which the proxy will not connect"), |
1047 |
AP_INIT_TAKE1("ProxyReceiveBufferSize", set_recv_buffer_size, NULL, RSRC_CONF, |
1083 |
AP_INIT_TAKE1("ProxyReceiveBufferSize", set_recv_buffer_size, NULL, RSRC_CONF, |