<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[不懂就问，为什么我的消息上报没反应？]]></title><description><![CDATA[<p dir="auto">我的<code>setting.yml</code>文件如下</p>
<pre><code>cors: 
  - '*'
host: 0.0.0.0
port: 8080
authKey: 'INITKEYlOwBjACm'
enableVerify: false
cacheSize: 4096
enableWebsocket: false
report:
  enable: true # 必须为true
  groupMessage:
    report: true  # 群消息上报
  friendMessage:
    report: true # 好友消息上报
  tempMessage:
    report: true # 临时会话上报
  eventMessage:
    report: true # 事件上报
  destinations:
  	- 'http://127.0.0.1:5000/report'
  extraHeaders: {}

heartbeat: 
  enable: false
  delay: 1000
  period: 15000
  destinations: []
  extraBody: {}

  extraHeaders: {}
adapterSettings:
  http:
    ## http server 监听的本地地址
    ## 一般为 localhost 即可, 如果多网卡等情况，自定设置
    host: localhost

    ## http server 监听的端口
    ## 与 websocket server 可以重复, 由于协议与路径不同, 不会产生冲突
    port: 8080

    ## 配置跨域, 默认允许来自所有域名
    cors: [*]

</code></pre>
<p dir="auto">接下来是用flask框架写的服务器端代码</p>
<pre><code class="language-python">@app.route('/report',methods=["POST"])
def get_tasks():
    if request.method=='POST':
        print(request.__dict__)
        return '1'
</code></pre>
<p dir="auto">flask运行时的提示</p>
<pre><code> * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
</code></pre>
<p dir="auto">上报地址应该没错？但不仅控制台没有打印信息，用fiddler抓包也找不到上报的包<br />
求解惑，万分感谢！</p>
]]></description><link>https://mirai.mamoe.net/topic/799/不懂就问-为什么我的消息上报没反应</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 18:38:21 GMT</lastBuildDate><atom:link href="https://mirai.mamoe.net/topic/799.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Nov 2021 02:02:24 GMT</pubDate><ttl>60</ttl></channel></rss>