|

楼主 |
发表于 2019-8-22 15:00:03
|
显示全部楼层
自己动手,丰衣足食
分析了一下appdaemon的代码,发现最新版里cookie是设置了一年的。
# Set cookie to last for 1 year
response.set_cookie("adcreds", hashed.decode("utf-8"), max_age=31536000)
我的appdaemon是在群晖docker里安装的,进去以后发现代码有点老(虽然是latest版),
里面对cookie的设置如下
response.set_cookie("adcreds", hashed.decode("utf-8"))
没有设置有效期,应该就是立即过期。
在后边加上max_age参数,重启appdaemon,问题解决。
现在用手机浏览器输入一次密码之后,以后每次直接可打开,非常方便。
修改的文件位置在:/usr/local/lib/python3.6/site-packages/appdaemon/rundash.py
|
|