HenryQW / Awesome-TTRSS

🐋 Awesome TTRSS, a powerful Dockerised all-in-one RSS solution.
http://ttrss.henry.wang
MIT License
2.43k stars 494 forks source link

[BUG]原生API链接总是错误 #523

Closed netdog2019 closed 3 months ago

netdog2019 commented 3 months ago

Bug 描述 简洁明了地描述这个 bug。 我用这个部署在docker上的,一切功能正常,我用支持fever API的客户端或者支持tiny RSS的客户端都可以正常连接。这应该说明这两类API功能都是正常的。但是我如果用官网提到的下面连接方式测试,发现一直提示错误,我也查了很多资料,发现网上关于原生api的资料很少,只有官网的信息。我试试着修改了后面位置,也一样错误。目前api我理解应该在http://example.com/api/这个位置。所以下面两个位置我都测试了,发现都是错误。 curl -d '{"op":"login","user":"you","password":"xxx"}' http://example.com/tt-rss/api/ curl -d '{"op":"login","user":"you","password":"xxx"}' http://example.com/api/

提示的错误如上。

我也测试了fever API,目前测试fever API链接是没有问题的。 curl -X GET "https://example.com:port/plugins/fever/?api&api_key=XXXXXXXXXXXXXXXXXXXXX"

这是哪里的问题,哪位大咖知道吗?

你谷歌/百度了吗? 请善用搜索引擎。 各种地方都搜索了。

部署方法

部署环境

TonyRL commented 3 months ago

API works fine from my testing

nginx access.log

172.20.0.1 - - [07/Aug/2024:13:40:32 +0000] "POST /api/ HTTP/1.1" 200 65 "-" "curl/7.88.1"
172.20.0.1 - - [07/Aug/2024:13:40:41 +0000] "POST /api/ HTTP/1.1" 200 65 "-" "curl/7.88.1"
172.20.0.1 - - [07/Aug/2024:13:40:58 +0000] "POST /api/ HTTP/1.1" 200 225 "-" "curl/7.88.1"

console

$ curl -d '{"op":"login","user":"you","password":"xxx"}' https://example.com/api/
{"seq":0,"status":1,"content":{"error":"LOGIN_ERROR"}}

$ curl -d '{"op":"login","user":"you","password":"xxx"}' https://example.com/api/
{"seq":0,"status":1,"content":{"error":"LOGIN_ERROR"}}

$ curl -d '{"op":"login","user":"you","password":"xxx"}' https://example.com/api/
{"seq":0,"status":0,"content":{"session_id":"xxx","config":{"icons_dir":"feed-icons","icons_url":"feed-icons","daemon_is_running":true,"custom_sort_types":[],"num_feeds":123},"api_level":21}}