added nginx to trigger scanning
This commit is contained in:
19
playbooks/templates/scan_image.conf
Normal file
19
playbooks/templates/scan_image.conf
Normal file
@ -0,0 +1,19 @@
|
||||
server {
|
||||
listen 80 http2;
|
||||
listen [::]:80 http2;
|
||||
|
||||
auth_basic "";
|
||||
auth_basic_user_file /etc/nginx/htpasswd/htpasswd_scan;
|
||||
|
||||
location /scan {
|
||||
content_by_lua_block {
|
||||
os.execute("scanimage >/tmp/image.jpg")
|
||||
ngx.redirect("/scan/image")
|
||||
}
|
||||
}
|
||||
|
||||
location /scan/image {
|
||||
try_files /tmp/image.jpg;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user