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

Bug: 多余请求头导致拿不到头像 #1377

Open
SaarChaffee opened this issue Mar 5, 2024 · 4 comments
Open

Bug: 多余请求头导致拿不到头像 #1377

SaarChaffee opened this issue Mar 5, 2024 · 4 comments
Labels
bug BUG

Comments

@SaarChaffee
Copy link

Describe the bug

控制台请求 kook 机器人头像时返回了403,但是我直接浏览器打开又是可以正常访问的。于是我在 Apifox 尝试直接访问这个链接,可以正常拿到头像。但是当我加上 Referer 为 selfUrl 的地址时,就出现了 403 了。

Steps to reproduce

image

image

Expected behavior

Screenshots

No response

Versions

System:
OS: Linux 5.4 Alpine Linux
CPU: (1) x64 Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz

Binaries:
Node: 20.9.0
Yarn: 1.22.19

Koishi:
Core: 4.17.2
Console: 5.25.8

Additional context

No response

@SaarChaffee SaarChaffee added the bug BUG label Mar 5, 2024
@shigma
Copy link
Member

shigma commented Mar 6, 2024

emmmmm 我不知道这是否是 fetch 的限制,如果你手动给 headers 传一个 referrer null 会覆盖吗?

@SaarChaffee
Copy link
Author

我只在适配器那里找到了 headers 的配置,试过传 '' 或者 null,并没有覆盖掉它。

@DGCK81LNN
Copy link
Contributor

DGCK81LNN commented Jun 4, 2024

@shigma
Copy link
Member

shigma commented Jun 4, 2024

能请问一下使用 fetch 的是哪一个插件吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug BUG
Projects
None yet
Development

No branches or pull requests

3 participants