From 6abbc060155950c7eb2c041f11c8cb5e9e70041e Mon Sep 17 00:00:00 2001 From: krumel Date: Sun, 27 Feb 2022 15:34:51 +0100 Subject: [PATCH] fixed nginx template --- playbooks/templates/scan_image.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/playbooks/templates/scan_image.conf b/playbooks/templates/scan_image.conf index dcd9765..ecd16ee 100644 --- a/playbooks/templates/scan_image.conf +++ b/playbooks/templates/scan_image.conf @@ -1,19 +1,19 @@ -server { - listen 80 http2; - listen [::]:80 http2; +erver { + listen 80; + listen [::]:80; auth_basic ""; auth_basic_user_file /etc/nginx/htpasswd/htpasswd_scan; location /scan { content_by_lua_block { - os.execute("scanimage >/srv/scans/image.jpg") - ngx.redirect("/scan/image") + os.execute("scanimage --format jpeg >/srv/scans/image.jpg") + ngx.redirect("/scan/image.jpg") } } - - location /scan/image { + + location /scan/image.jpg { alias /srv/scans/image.jpg; } - + } \ No newline at end of file