fix: 修复前台获取新闻时验证码验证失败的问题
问题原因:fetch请求缺少credentials选项,导致浏览器不发送session cookie 解决方案:添加credentials: 'same-origin'确保发送session cookie Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1036,6 +1036,7 @@ function loadNewsWithCaptcha(siteCode, captcha) {
|
||||
// 调用新闻获取API
|
||||
fetch(`/api/fetch-news/${siteCode}`, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin', // 确保发送session cookie
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user