Lines Matching refs:plcf

127     ngx_http_proxy_ctx_t *ctx, ngx_http_proxy_loc_conf_t *plcf);
207 ngx_http_proxy_loc_conf_t *plcf);
869 ngx_http_proxy_loc_conf_t *plcf; in ngx_http_proxy_handler() local
885 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); in ngx_http_proxy_handler()
889 if (plcf->proxy_lengths == NULL) { in ngx_http_proxy_handler()
890 ctx->vars = plcf->vars; in ngx_http_proxy_handler()
891 u->schema = plcf->vars.schema; in ngx_http_proxy_handler()
893 u->ssl = (plcf->upstream.ssl != NULL); in ngx_http_proxy_handler()
897 if (ngx_http_proxy_eval(r, ctx, plcf) != NGX_OK) { in ngx_http_proxy_handler()
904 u->conf = &plcf->upstream; in ngx_http_proxy_handler()
920 if (plcf->redirects) { in ngx_http_proxy_handler()
924 if (plcf->cookie_domains || plcf->cookie_paths) { in ngx_http_proxy_handler()
928 u->buffering = plcf->upstream.buffering; in ngx_http_proxy_handler()
945 u->peer.belong_to_host = plcf->kernel_network_stack; in ngx_http_proxy_handler()
949 if (!plcf->upstream.request_buffering in ngx_http_proxy_handler()
950 && plcf->body_values == NULL && plcf->upstream.pass_request_body in ngx_http_proxy_handler()
952 || plcf->http_version == NGX_HTTP_VERSION_11)) in ngx_http_proxy_handler()
969 ngx_http_proxy_loc_conf_t *plcf) in ngx_http_proxy_eval() argument
978 if (ngx_http_script_run(r, &proxy, plcf->proxy_lengths->elts, 0, in ngx_http_proxy_eval()
979 plcf->proxy_values->elts) in ngx_http_proxy_eval()
1080 ngx_http_proxy_loc_conf_t *plcf; in ngx_http_proxy_create_key() local
1084 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); in ngx_http_proxy_create_key()
1093 if (plcf->cache_key.value.data) { in ngx_http_proxy_create_key()
1095 if (ngx_http_complex_value(r, &plcf->cache_key, key) != NGX_OK) { in ngx_http_proxy_create_key()
1109 if (plcf->proxy_lengths && ctx->vars.uri.len) { in ngx_http_proxy_create_key()
1123 loc_len = (r->valid_location && ctx->vars.uri.len) ? plcf->location.len : 0; in ngx_http_proxy_create_key()
1186 ngx_http_proxy_loc_conf_t *plcf; in ngx_http_proxy_create_request() local
1191 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); in ngx_http_proxy_create_request()
1194 headers = u->cacheable ? &plcf->headers_cache : &plcf->headers; in ngx_http_proxy_create_request()
1196 headers = &plcf->headers; in ngx_http_proxy_create_request()
1203 } else if (plcf->method) { in ngx_http_proxy_create_request()
1204 if (ngx_http_complex_value(r, plcf->method, &method) != NGX_OK) { in ngx_http_proxy_create_request()
1227 if (plcf->proxy_lengths && ctx->vars.uri.len) { in ngx_http_proxy_create_request()
1236 plcf->location.len : 0; in ngx_http_proxy_create_request()
1257 ngx_http_script_flush_no_cacheable_variables(r, plcf->body_flushes); in ngx_http_proxy_create_request()
1260 if (plcf->body_lengths) { in ngx_http_proxy_create_request()
1261 le.ip = plcf->body_lengths->elts; in ngx_http_proxy_create_request()
1304 if (plcf->upstream.pass_request_headers) { in ngx_http_proxy_create_request()
1352 if (plcf->proxy_lengths && ctx->vars.uri.len) { in ngx_http_proxy_create_request()
1381 if (plcf->http_version == NGX_HTTP_VERSION_11) { in ngx_http_proxy_create_request()
1440 if (plcf->upstream.pass_request_headers) { in ngx_http_proxy_create_request()
1481 if (plcf->body_values) { in ngx_http_proxy_create_request()
1482 e.ip = plcf->body_values->elts; in ngx_http_proxy_create_request()
1507 } else if (plcf->body_values == NULL && plcf->upstream.pass_request_body) { in ngx_http_proxy_create_request()
2531 ngx_http_proxy_loc_conf_t *plcf; in ngx_http_proxy_rewrite_redirect() local
2533 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); in ngx_http_proxy_rewrite_redirect()
2535 pr = plcf->redirects->elts; in ngx_http_proxy_rewrite_redirect()
2543 for (i = 0; i < plcf->redirects->nelts; i++) { in ngx_http_proxy_rewrite_redirect()
2561 ngx_http_proxy_loc_conf_t *plcf; in ngx_http_proxy_rewrite_cookie() local
2572 plcf = ngx_http_get_module_loc_conf(r, ngx_http_proxy_module); in ngx_http_proxy_rewrite_cookie()
2574 if (plcf->cookie_domains) { in ngx_http_proxy_rewrite_cookie()
2579 plcf->cookie_domains); in ngx_http_proxy_rewrite_cookie()
2590 if (plcf->cookie_paths) { in ngx_http_proxy_rewrite_cookie()
2595 plcf->cookie_paths); in ngx_http_proxy_rewrite_cookie()
3606 ngx_http_proxy_loc_conf_t *plcf = conf; in ngx_http_proxy_pass() local
3616 if (plcf->upstream.upstream || plcf->proxy_lengths) { in ngx_http_proxy_pass()
3640 sc.lengths = &plcf->proxy_lengths; in ngx_http_proxy_pass()
3641 sc.values = &plcf->proxy_values; in ngx_http_proxy_pass()
3651 plcf->ssl = 1; in ngx_http_proxy_pass()
3664 plcf->ssl = 1; in ngx_http_proxy_pass()
3687 plcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0); in ngx_http_proxy_pass()
3688 if (plcf->upstream.upstream == NULL) { in ngx_http_proxy_pass()
3692 plcf->vars.schema.len = add; in ngx_http_proxy_pass()
3693 plcf->vars.schema.data = url->data; in ngx_http_proxy_pass()
3694 plcf->vars.key_start = plcf->vars.schema; in ngx_http_proxy_pass()
3696 ngx_http_proxy_set_vars(&u, &plcf->vars); in ngx_http_proxy_pass()
3698 plcf->location = clcf->name; in ngx_http_proxy_pass()
3706 if (plcf->vars.uri.len) { in ngx_http_proxy_pass()
3716 plcf->location.len = 0; in ngx_http_proxy_pass()
3719 plcf->url = *url; in ngx_http_proxy_pass()
3728 ngx_http_proxy_loc_conf_t *plcf = conf; in ngx_http_proxy_redirect() local
3735 if (plcf->redirect == 0) { in ngx_http_proxy_redirect()
3739 plcf->redirect = 1; in ngx_http_proxy_redirect()
3745 plcf->redirect = 0; in ngx_http_proxy_redirect()
3746 plcf->redirects = NULL; in ngx_http_proxy_redirect()
3753 plcf->redirect = 0; in ngx_http_proxy_redirect()
3754 plcf->redirects = NULL; in ngx_http_proxy_redirect()
3765 if (plcf->redirects == NULL) { in ngx_http_proxy_redirect()
3766 plcf->redirects = ngx_array_create(cf->pool, 1, in ngx_http_proxy_redirect()
3768 if (plcf->redirects == NULL) { in ngx_http_proxy_redirect()
3773 pr = ngx_array_push(plcf->redirects); in ngx_http_proxy_redirect()
3779 if (plcf->proxy_lengths) { in ngx_http_proxy_redirect()
3786 if (plcf->url.data == NULL) { in ngx_http_proxy_redirect()
3799 if (plcf->vars.uri.len) { in ngx_http_proxy_redirect()
3800 pr->pattern.complex.value = plcf->url; in ngx_http_proxy_redirect()
3801 pr->replacement.value = plcf->location; in ngx_http_proxy_redirect()
3804 pr->pattern.complex.value.len = plcf->url.len + sizeof("/") - 1; in ngx_http_proxy_redirect()
3813 p = ngx_cpymem(p, plcf->url.data, plcf->url.len); in ngx_http_proxy_redirect()
3874 ngx_http_proxy_loc_conf_t *plcf = conf; in ngx_http_proxy_cookie_domain() local
3880 if (plcf->cookie_domains == NULL) { in ngx_http_proxy_cookie_domain()
3889 plcf->cookie_domains = NULL; in ngx_http_proxy_cookie_domain()
3898 if (plcf->cookie_domains == NGX_CONF_UNSET_PTR) { in ngx_http_proxy_cookie_domain()
3899 plcf->cookie_domains = ngx_array_create(cf->pool, 1, in ngx_http_proxy_cookie_domain()
3901 if (plcf->cookie_domains == NULL) { in ngx_http_proxy_cookie_domain()
3906 pr = ngx_array_push(plcf->cookie_domains); in ngx_http_proxy_cookie_domain()
3961 ngx_http_proxy_loc_conf_t *plcf = conf; in ngx_http_proxy_cookie_path() local
3967 if (plcf->cookie_paths == NULL) { in ngx_http_proxy_cookie_path()
3976 plcf->cookie_paths = NULL; in ngx_http_proxy_cookie_path()
3985 if (plcf->cookie_paths == NGX_CONF_UNSET_PTR) { in ngx_http_proxy_cookie_path()
3986 plcf->cookie_paths = ngx_array_create(cf->pool, 1, in ngx_http_proxy_cookie_path()
3988 if (plcf->cookie_paths == NULL) { in ngx_http_proxy_cookie_path()
3993 pr = ngx_array_push(plcf->cookie_paths); in ngx_http_proxy_cookie_path()
4085 ngx_http_proxy_loc_conf_t *plcf = conf; in ngx_http_proxy_store() local
4090 if (plcf->upstream.store != NGX_CONF_UNSET) { in ngx_http_proxy_store()
4097 plcf->upstream.store = 0; in ngx_http_proxy_store()
4102 if (plcf->upstream.cache > 0) { in ngx_http_proxy_store()
4107 plcf->upstream.store = 1; in ngx_http_proxy_store()
4120 sc.lengths = &plcf->upstream.store_lengths; in ngx_http_proxy_store()
4121 sc.values = &plcf->upstream.store_values; in ngx_http_proxy_store()
4139 ngx_http_proxy_loc_conf_t *plcf = conf; in ngx_http_proxy_cache() local
4147 if (plcf->upstream.cache != NGX_CONF_UNSET) { in ngx_http_proxy_cache()
4152 plcf->upstream.cache = 0; in ngx_http_proxy_cache()
4156 if (plcf->upstream.store > 0) { in ngx_http_proxy_cache()
4160 plcf->upstream.cache = 1; in ngx_http_proxy_cache()
4174 plcf->upstream.cache_value = ngx_palloc(cf->pool, in ngx_http_proxy_cache()
4176 if (plcf->upstream.cache_value == NULL) { in ngx_http_proxy_cache()
4180 *plcf->upstream.cache_value = cv; in ngx_http_proxy_cache()
4185 plcf->upstream.cache_zone = ngx_shared_memory_add(cf, &value[1], 0, in ngx_http_proxy_cache()
4187 if (plcf->upstream.cache_zone == NULL) { in ngx_http_proxy_cache()
4198 ngx_http_proxy_loc_conf_t *plcf = conf; in ngx_http_proxy_cache_key() local
4205 if (plcf->cache_key.value.data) { in ngx_http_proxy_cache_key()
4213 ccv.complex_value = &plcf->cache_key; in ngx_http_proxy_cache_key()
4230 ngx_http_proxy_loc_conf_t *plcf = conf; in ngx_http_proxy_ssl_password_file() local
4234 if (plcf->ssl_passwords != NGX_CONF_UNSET_PTR) { in ngx_http_proxy_ssl_password_file()
4240 plcf->ssl_passwords = ngx_ssl_read_password_file(cf, &value[1]); in ngx_http_proxy_ssl_password_file()
4242 if (plcf->ssl_passwords == NULL) { in ngx_http_proxy_ssl_password_file()
4284 ngx_http_proxy_set_ssl(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *plcf) in ngx_http_proxy_set_ssl() argument
4288 plcf->upstream.ssl = ngx_pcalloc(cf->pool, sizeof(ngx_ssl_t)); in ngx_http_proxy_set_ssl()
4289 if (plcf->upstream.ssl == NULL) { in ngx_http_proxy_set_ssl()
4293 plcf->upstream.ssl->log = cf->log; in ngx_http_proxy_set_ssl()
4295 if (ngx_ssl_create(plcf->upstream.ssl, plcf->ssl_protocols, NULL) in ngx_http_proxy_set_ssl()
4303 ngx_ssl_cleanup_ctx(plcf->upstream.ssl); in ngx_http_proxy_set_ssl()
4308 cln->data = plcf->upstream.ssl; in ngx_http_proxy_set_ssl()
4310 if (plcf->ssl_certificate.len) { in ngx_http_proxy_set_ssl()
4312 if (plcf->ssl_certificate_key.len == 0) { in ngx_http_proxy_set_ssl()
4315 "for certificate \"%V\"", &plcf->ssl_certificate); in ngx_http_proxy_set_ssl()
4319 if (ngx_ssl_certificate(cf, plcf->upstream.ssl, &plcf->ssl_certificate, in ngx_http_proxy_set_ssl()
4320 &plcf->ssl_certificate_key, plcf->ssl_passwords) in ngx_http_proxy_set_ssl()
4327 if (ngx_ssl_ciphers(cf, plcf->upstream.ssl, &plcf->ssl_ciphers, 0) in ngx_http_proxy_set_ssl()
4333 if (plcf->upstream.ssl_verify) { in ngx_http_proxy_set_ssl()
4334 if (plcf->ssl_trusted_certificate.len == 0) { in ngx_http_proxy_set_ssl()
4340 if (ngx_ssl_trusted_certificate(cf, plcf->upstream.ssl, in ngx_http_proxy_set_ssl()
4341 &plcf->ssl_trusted_certificate, in ngx_http_proxy_set_ssl()
4342 plcf->ssl_verify_depth) in ngx_http_proxy_set_ssl()
4348 if (ngx_ssl_crl(cf, plcf->upstream.ssl, &plcf->ssl_crl) != NGX_OK) { in ngx_http_proxy_set_ssl()
4353 if (ngx_ssl_client_session_cache(cf, plcf->upstream.ssl, in ngx_http_proxy_set_ssl()
4354 plcf->upstream.ssl_session_reuse) in ngx_http_proxy_set_ssl()