当前位置:网站首页>Request header field xxxx is not allowed by Access-Control-Allow-Headers in preflight response问题
Request header field xxxx is not allowed by Access-Control-Allow-Headers in preflight response问题
2022-06-29 17:53:00 【胡安民】
报错信息
这是因为目标服务不允许在请求头中加 x-run-as 这个
解决办法
第一种,前端请时候将请求头中的 x-run-as 这个去掉
第二种,后端跨域配置中的Access-Control-Allow-Headers请求头中添加这个key
//添加上x-run-as,不能使用*否则只会当做普通字符串
response.setHeader("Access-Control-Allow-Headers", "Content-Type,Access-Token,x-run-as");


边栏推荐
- What is a SCM system? What are the advantages of a supply chain management system?
- Yolov6+tensorrt+onnx: deployment based on win10+tensorrt8+yolov6+onnx
- Digital twin energy system, creating a "perspective" in the low-carbon era
- What technology is an applet container? Can it help Internet of things enterprises break through the red sea?
- ABC253 D FizzBuzz Sum Hard(容斥定理)
- Adobe Premiere基础-编辑素材文件常规操作(脱机文件,替换素材,素材标签和编组,素材启用,便捷调节不透明度,项目打包)(十七)
- Xiaobai yuesai 51 supplement e g f
- Maxcompute string replacement function -replace
- Segment tree and tree array template (copy and paste are really easy to use)
- 【TcaplusDB知识库】TcaplusDB单据受理-事务执行介绍
猜你喜欢

Yurun multidimensional makes efforts in the charity field and bravely resists the corporate public welfare banner

Mysql database literacy, do you really know what a database is

Two controller layer interface authentication methods

Spingmvc requests and responses

js两个二维数组合并并去除相同项(整理)

分布式 | 几步快速拥有读写分离

Maidong Internet won the bid of Dajia Insurance Group

Distributed | several steps of rapid read / write separation

最受欢迎的30款开源软件

ISO 32000-2 国际标准7.7
随机推荐
Software testing - you may not understand the basic theoretical knowledge
Visio标注、批注位置
Opencv+yolo-v3 for target tracking
Partial mock of static class of phpunit operation
布隆过滤器:
NVIDIA installs the latest graphics card driver
[try to hack] cookies and sessions
给定一个数在序列中求最大异或值(01字典)
[target tracking] |stark configuration win OTB
QQ如何开通在线客服
回文子串的最大长度(字符串哈希+二分)
Proxmox VE Install 7.2
Configure the local domain name through the hosts file
Abc253 D fizzbuzz sum hard (tolerance exclusion theorem)
Jar包后台启动并输出日志
Goldfish rhca memoirs: do447 building advanced job workflow -- using fact cache to improve performance
Digital twin energy system, creating a "perspective" in the low-carbon era
【目标跟踪】|stark配置 win otb
Servlet学生管理系统(萌新练手版)
Test dble split function execution + import time-consuming shell script reference