crontab-ui icon indicating copy to clipboard operation
crontab-ui copied to clipboard

Unable to view log stdout? id=id6CQ4gfnJlDn17m

Open aogg opened this issue 2 years ago • 4 comments

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 avatar Aug 15 '23 11:08 aogg

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 avatar Oct 31 '23 02:10 aogg

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 avatar Oct 31 '23 02:10 aogg

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 avatar Oct 31 '23 02:10 aogg

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

aogg avatar Oct 31 '23 03:10 aogg