leonismoe / genshin-stats

Query Genshin Impact's game record data for CN server. 根据原神 UID 查询统计数据、角色列表、深境螺旋战绩
https://genshin-stats.leonis.dev/
MIT License
45 stars 7 forks source link

查询时报错 #1

Closed MakiseKurisu closed 2 years ago

MakiseKurisu commented 2 years ago

Firefox+Violentmonkey

米游社登录,安装userscript,打开查询页面,输入UID,点击查询后console报错:

Uncaught (in promise) TypeError: Headers constructor: ltoken=***; Path=/; Domain=mihoyo.com; Max-Age=31536000
ltuid=***; Path=/; Domain=mihoyo.com; Max-Age=31536000 is an invalid header value.
    transformHeaders moz-extension://f5056d9c-4554-4f02-b3c1-8ca790a5bfd0/ Genshin Stats.user.js#1:64
    onload moz-extension://f5056d9c-4554-4f02-b3c1-8ca790a5bfd0/ Genshin Stats.user.js#1:43
    HttpRequested moz-extension://f5056d9c-4554-4f02-b3c1-8ca790a5bfd0/sandbox/injected-web.js:1

transformHeaders(header)里加了个console.log(header),可以看到这个cookie的确是分行了。

leonismoe commented 2 years ago

感谢您的反馈,这个 transformHeaders 导致的问题已被修复并部署,请确保在 Violentmonkey 或者 Tampermonkey 中更新对应的用户脚本到 1.2.0 版本。
您也可以访问 https://genshin-stats.leonis.dev/genshin-stats.user.js 手动触发更新。


Thanks for your feedback, this issue with transformHeaders has been fixed and deployed, be sure to update the user script to 1.2.0 in Violentmonkey or Tampermonkey.
You can also visit https://genshin-stats.leonis.dev/genshin-stats.user.js to trigger the update.