Add support for the "No Upstream" config option
Change-Id: Id684ea89363f341abc6a6adf5db6748633a1b456
Closes-Bug: PROD-20662
diff --git a/README.rst b/README.rst
index 598e985..e1207b5 100644
--- a/README.rst
+++ b/README.rst
@@ -23,6 +23,9 @@
connect_ports:
- 443
upstream: 10.11.236.1:8080
+ noupstream:
+ - domain.to.be.excluded.from.proxying
+ - 127.0.0.0/24
More Information
diff --git a/tinyproxy/files/tinyproxy.conf b/tinyproxy/files/tinyproxy.conf
index 5fc48f8..88970ae 100644
--- a/tinyproxy/files/tinyproxy.conf
+++ b/tinyproxy/files/tinyproxy.conf
@@ -15,6 +15,9 @@
{%- if server.upstream is defined %}
Upstream {{ server.upstream }}
{%- endif %}
+{%- for url in server.get('noupstream', []) %}
+No Upstream "{{ url }}"
+{%- endfor %}
MaxClients {{ server.get('max_clients', '550') }}
MinSpareServers {{ server.get('minspareservers', '15') }}
MaxSpareServers {{ server.get('maxspareservers', '20') }}