Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问 上报的 destinations:[] 怎么写? #238

Closed
wandefou opened this issue Jan 13, 2021 · 8 comments
Closed

请问 上报的 destinations:[] 怎么写? #238

wandefou opened this issue Jan 13, 2021 · 8 comments

Comments

@wandefou
Copy link

settings.yml

report:
enable: true
groupMessage:
report: true
friendMessage:
report: true
tempMessage:
report: true
eventMessage:
report: true
destinations: [0.0.0.0:9528] # <---------- 这里怎么写?
extraHeaders: {}

@wandefou
Copy link
Author

destinations: [0.0.0.0,9528] # <---------- 加个逗号,额

@ryoii
Copy link
Collaborator

ryoii commented Jan 14, 2021

填需要上报到的接口,多个地址参考 yaml 文件的数组写法

@wandefou
Copy link
Author

好的 谢谢

@ywyself
Copy link

ywyself commented Jan 30, 2021

 # 上报URL
 destinations:
     - /receive

上报到http://localhost/receive, 好像不能指定域名

@ryoii
Copy link
Collaborator

ryoii commented Jan 30, 2021

 # 上报URL
 destinations:
     - /receive

上报到http://localhost/receive, 好像不能指定域名

没有理解,是指指定了域名不生效?还是不指定域名也能生效,还是目前不论怎么写都不能生效

@ywyself
Copy link

ywyself commented Feb 1, 2021

 # 上报URL
 destinations:
     - /receive

上报到http://localhost/receive, 好像不能指定域名

没有理解,是指指定了域名不生效?还是不指定域名也能生效,还是目前不论怎么写都不能生效

是不能写域名, 只能写路径, 上报的时候, 只会上报到http://localhost:80 下, 例如: 我写了上报地址为http://127.0.0.1/receive, 上报的时候会报错E/net.mamoe.mirai-api-http: 上报http失败: Client request(http://localhost/http) invalid: 404 . Text: "{"timestamp":"2021-02-01T13:40:29.272+0000","status":404,"error":"Not Found","message":"No message available","path":"/http"}", 前面多了http://localhost

@ryoii
Copy link
Collaborator

ryoii commented Feb 2, 2021

 # 上报URL
 destinations:
     - 'http://localhost/receive'

字符串里带了冒号,引号包围就好了

@ryoii
Copy link
Collaborator

ryoii commented Feb 12, 2021

长时间未回复,予以关闭。
还有其他问题,直接原 issue 下回复或 reopen

@ryoii ryoii closed this as completed Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants