Replies: 2 comments 3 replies
-
好像刚刚在群里看到了这个问题(?) 我的疑问是,你的网页和你的服务之间有没有考虑过 cookie 或者是其他的更加 web 一点的方案? |
Beta Was this translation helpful? Give feedback.
1 reply
-
确认需求:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我目前尝试在浏览器中实现 onebot 协议(网页交互),但是在与 onebot 应用端(nonebot2)连接时出现了问题。
自定义的请求头无法传递给应用端,从而导致了出现
Missing X-Self-ID Header
错误。我在检索了相关问题之后,确认到可能是浏览器中的 ws 连接不支持自定义请求头,因此我想问一下是否有可能对 onebot12 协议的 ws 连接部分进行修改以支持浏览器实现?
部分参考链接:
Why can't websockets support custom headers? - StackExchange
Custom headers for WebSocket JS - StackOverflow
Websocket connection with authorization header - StackOverflow
How else can I set custom headers? #467 - github.com/websockets/ws
Beta Was this translation helpful? Give feedback.
All reactions