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