小编92y*_*2yo的帖子

431 -(请求标头字段太大)

第一次发帖,请阅读时牢记

我尝试过的事情:清除我的谷歌浏览器缓存和cookie,尝试隐身模式,将我的节点更新到最新版本仍然遇到相同的错误。

我获取 chrome 时出错:无法加载资源:服务器响应状态为 431(请求标头字段太大)

auth.js:22怀疑它的相关性,但是开发工具中的源代码在获取部分给我错误

export const authInit = data => {
      const { user, type } = data;
      let url;
      if (type === "Login") {
        url = "/api/auth/login";
      } else if (type === "Register") {
        url = "/api/auth/register";
      }
      return dispatch => {
        dispatch({ type: actionTypes.LOADING });
        return fetch(url, {
          method: "POST",
          body: JSON.stringify(user),
          headers: {
            "Content-Type": "application/json"
          }
        })
          .then(res => res.json())
          .then(response => {
            if (!response.success) {
              return dispatch(authError(response.messages));
            }
Run Code Online (Sandbox Code Playgroud)

javascript node.js express reactjs redux

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

express ×1

javascript ×1

node.js ×1

reactjs ×1

redux ×1