From da1d147fc9cf4eec4cbdd10aa470f160705936d8 Mon Sep 17 00:00:00 2001 From: Blondel MONDESIR <16546989+deldesir@users.noreply.github.com> Date: Tue, 4 May 2021 11:51:20 -0400 Subject: [PATCH] Update to work with http://box/cups/ --- roles/cups/templates/cups.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/cups/templates/cups.conf b/roles/cups/templates/cups.conf index 07e754ac7..bd8d04c7f 100644 --- a/roles/cups/templates/cups.conf +++ b/roles/cups/templates/cups.conf @@ -7,4 +7,15 @@ location ~ /print/(.*) { sub_filter ' src="/' ' src="/print/'; sub_filter_types *; sub_filter_once off; +} + +location ~ /cups/(.*) { + proxy_pass http://127.0.0.1:631/$1; + proxy_set_header Host '127.0.0.1'; + + sub_filter ' href="/' ' href="/cups/'; + sub_filter ' action="/' ' action="/cups/'; + sub_filter ' src="/' ' src="/cups/'; + sub_filter_types *; + sub_filter_once off; }