🎨 Add user-agent header for sync websocket conn

This commit is contained in:
Daniel 2023-10-29 09:54:26 +08:00
parent dd5f9f3d66
commit afd5a20936
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -770,6 +770,7 @@ var KernelID = gulu.Rand.String(7)
func dialSyncWebSocket() (c *websocket.Conn, err error) {
endpoint := util.GetCloudWebSocketServer() + "/apis/siyuan/dejavu/ws"
header := http.Header{
"User-Agent": []string{util.UserAgent},
"x-siyuan-uid": []string{Conf.User.UserId},
"x-siyuan-kernel": []string{KernelID},
"x-siyuan-ver": []string{util.Ver},