alseambusher / crontab-ui

Easy and safe way to manage your crontab file
https://lifepluslinux.blogspot.com/2015/06/crontab-ui-easy-and-safe-way-to-manage.html
MIT License
2.84k stars 475 forks source link

Unable to view log stdout? id=id6CQ4gfnJlDn17m #238

Open aogg opened 1 year ago

aogg commented 1 year ago

docker rm -f crontab-ui;\ docker run --network common-all --restart=always -d --name crontab-ui \ -v /data/docker/crontab-ui/crontabs/:/crontab-ui/crontabs/ \ -p 8000:8000 \ dockerproxy.com/alseambusher/crontab-ui

aogg commented 10 months ago

response

HTTP/1.1 304 Not Modified
Via: 1.1 tinyproxy (tinyproxy/1.11.1)
Server: openresty/1.21.4.1
Date: Tue, 31 Oct 2023 02:26:25 GMT
X-Powered-By: Express
WWW-Authenticate: Basic realm="Restricted Area"
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Mon, 30 Oct 2023 17:02:20 GMT
ETag: W/"10643-18b81894af6"
aogg commented 10 months ago

request

GET /stdout?id=9tr9SYNA2V0CMVOB HTTP/1.1
Host: aa.sslip.io
Authorization: Basic YaaaaDU2
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Referer: http://aa.sslip.io/
Accept-Encoding: gzip
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
If-None-Match: W/"10643-18b81894af6"
If-Modified-Since: Mon, 30 Oct 2023 17:02:20 GMT
x-forwarded-for: 172.29.192.1
Connection: keep-alive
aogg commented 10 months ago

you code

// basic auth
var BASIC_AUTH_USER = process.env.BASIC_AUTH_USER;
var BASIC_AUTH_PWD = process.env.BASIC_AUTH_PWD;

if (BASIC_AUTH_USER && BASIC_AUTH_PWD) {
    app.use(function(req, res, next) {
        res.setHeader('WWW-Authenticate', 'Basic realm="Restricted Area"')
        next();
    });

    app.use(basicAuth({
        users: {
            [BASIC_AUTH_USER]: BASIC_AUTH_PWD
        }
    }))
}
aogg commented 10 months ago

There is a function of automatically using http cache, which always triggers the download.