.
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
erver {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
@ -7,13 +7,15 @@ erver {
|
|||||||
|
|
||||||
location /scan {
|
location /scan {
|
||||||
content_by_lua_block {
|
content_by_lua_block {
|
||||||
os.execute("scanimage --format jpeg >/srv/scans/image.jpg")
|
epoc = ngx.time();
|
||||||
ngx.redirect("/scan/image.jpg")
|
os.execute("scanimage --format jpeg >/srv/scans/image"..epoc..".jpg");
|
||||||
|
ngx.redirect("/scans/image"..epoc..".jpg");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
location /scan/image.jpg {
|
location /scans {
|
||||||
alias /srv/scans/image.jpg;
|
autoindex on;
|
||||||
|
root /srv/;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user