fix README.md

This commit is contained in:
jxxghp 2024-03-16 18:28:09 +08:00
parent 550fe26d76
commit f345d94009
2 changed files with 10 additions and 5 deletions

View File

@ -21,7 +21,11 @@
### 2. **安装CookieCloud服务端可选**
MoviePilot内置了公共CookieCloud服务器如果需要自建服务可参考 [CookieCloud](https://github.com/easychen/CookieCloud) 项目进行搭建docker镜像请点击 [这里](https://hub.docker.com/r/easychen/cookiecloud)。
通过CookieCloud可以快速同步浏览器中保存的站点数据到MoviePilot支持以下服务方式
- 使用公共CookieCloud服务器默认服务器地址为https://movie-pilot.org/cookiecloud
- 使用内建的本地Cookie服务设置`COOKIECLOUD_ENABLE_LOCAL``true`时启用,服务地址为:`http://localhost:${NGINX_PORT}/cookiecloud/`, Cookie数据加密保存在配置文件目录下的`cookies`文件中
- 自建服务CookieCloud服务器参考 [CookieCloud](https://github.com/easychen/CookieCloud) 项目进行搭建docker镜像请点击 [这里](https://hub.docker.com/r/easychen/cookiecloud)
**声明:** 本项目不会收集用户敏感数据Cookie同步也是基于CookieCloud项目实现非本项目提供的能力。技术角度上CookieCloud采用端到端加密在个人不泄露`用户KEY``端对端加密密码`的情况下第三方无法窃取任何用户信息(包括服务器持有者)。如果你不放心,可以不使用公共服务或者不使用本项目,但如果使用后发生了任何信息泄露与本项目无关!
@ -224,7 +228,7 @@ location / {
server {
listen 443 ssl;
http2 on;
...
# ...
}
```
- 新建的企业微信应用需要固定公网IP的代理才能收到消息代理添加以下代码

View File

@ -14,6 +14,8 @@ from app.utils.common import get_decrypted_cookie_data
class GzipRequest(Request):
_body: bytes = b""
async def body(self) -> bytes:
if not hasattr(self, "_body"):
body = await super().body()
@ -66,10 +68,9 @@ async def update_cookie(req: schemas.CookieData):
content = json.dumps({"encrypted": req.encrypted})
with open(file_path, encoding="utf-8", mode="w") as file:
file.write(content)
read_content = None
with open(file_path, encoding="utf-8", mode="r") as file:
read_content = file.read()
if (read_content == content):
if read_content == content:
return {"action": "done"}
else:
return {"action": "error"}