Hi, Yes NGINX can inspect the header, See the following full example. It will check for the match of "true" case-insensitive. I am simulating your backend on port 81. Does this make sense? map $upstream_http_x_secured_page $nocache { ~*true "1"; default ""; } upstream backend { server 127.0.0.1:by webopsx - Nginx Mailing List - English
Hi, The map is processed on each request and should be very consistent. I thought you wanted to disable cache on the existence of a response header, not a request header. Otherwise I think we need more information to understand, such as how are you testing? Perhaps paste your full configuration here after removing any sensitive text.by webopsx - Nginx Mailing List - English
You can use map for this... - http://nginx.org/en/docs/http/ngx_http_map_module.html#map map $upstream_http_x_secured_page $nocache { "search string" "1" default ""; } location /foo { ... proxy_no_cache $nocache; }by webopsx - Nginx Mailing List - English
Hi, If I understand correctly you actually don't want to cache specific responses (not bypass). The proxy_cache_bypass is only for if the response has already been cached and defines the behavior in which NGINX should serve the cached version to a client. Therefore if I understand correctly, you should be using the upstream module for your origin definition and the proper variable will be aby webopsx - Nginx Mailing List - English
Also, It might be better to check the $arg_*argument *variable instead and also set a check for $is_args. NGINX will process them in order within the configuration. map $is_args $redirect { "?" "1"; default ""; } map $arg_emailaddress $redirect { ~.+%40 ''; default "1&quby webopsx - Nginx Mailing List - English
Hi, You would be better to accomplish this with map. Would this work? map $args $redirect { ~emailaddress=.+%40 ''; default "1"; } server { ... location / { ... } location /foo { if ($redirect) { return 301 /; } ... } } On Sat, Mar 4, 2017 at 1:52 PM, 173279834462 <nginx-forum@forum.by webopsx - Nginx Mailing List - English
Hi there, You might want to look into the GeoIP module. http://nginx.org/en/docs/http/ngx_http_geoip_module.htmlby webopsx - How to...
Hi. Would something like this work for you? server { listen 80 default; server_name _; return 200 'default\n'; ... } server { listen 80; server_name ~^.*\..*\..*$; return 444; } Testing with curl... # curl -H "Host:example123.com" localhostby webopsx - How to...
Hello Atul, Is this what you are looking for? Keep in mind I just threw this together to give you an idea of how you could do this and it should be tested. Let me know if you have any suggestions or questions. https://github.com/kmjones1979/docker-nginx-compiled/blob/master/Dockerfile git@github.com:kmjones1979/docker-nginx-compiled.git --- Kevin http://nginx.org/ On 8/26/15, 9:16 PM, &by webopsx - Nginx Mailing List - English