服务器响应状态为431(请求标头字段太大)

时间:2020-05-01 20:29:41

标签: node.js reactjs api jwt token

我有注册/登录页面,当用户注册时,他可以上传图像,该图像应发送到服务器,当服务器获取数据时,它应生成令牌,令牌应包含上传的文件(“ data:image / jpeg; base64 “),当它生成令牌时,它很大,并且我得到431状态。 有什么办法可以解决这个问题?

 <div class="container">
      <div class="row">
          <div class="col-sm-12">
        <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators d-none">
          <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
          <li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
          <li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
        </ol>

        <div class="carousel-inner">
          <div class="carousel-item active">
              <div class="row">
                  <div class="col-xs-4">

                   <img src="img/10.jpg" class="img-item" alt="...">


            </div>
            <div class="col-xs-4">

                <img src="img/11.jpg" class="img-item" alt="...">


         </div>
         <div class="col-xs-4">

            <img src="img/12.jpg" class="img-item" alt="...">


          </div>

         </div>
        </div>
    </div>
        <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
          <span class="carousel-control-prev-icon" aria-hidden="true"></span>
          <span class="sr-only">Previous</span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
          <span class="carousel-control-next-icon" aria-hidden="true"></span>
          <span class="sr-only">Next</span>
        </a>

    </div>
</div>
</div>
</div>

0 个答案:

没有答案