当前位置:网站首页>flask解决CORS ERR 问题
flask解决CORS ERR 问题
2022-07-05 16:36:00 【go_flush】
- 首先呢,你要确定你的nginx 中已配置允许跨域
例如:
在location中添加如下:
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE;
然后安装flask 解决跨域的包
pip install flask_cors使用方法如下:
from flask_cors import CORS
app = Flask(__name__)
CORS(app,supports_credentials=True)
边栏推荐
- Games101 notes (III)
- How can C TCP set heartbeat packets to be elegant?
- 【Web攻防】WAF检测技术图谱
- Timestamp strtotime the day before or after the date
- Embedded-c Language-3
- 【剑指 Offer】63. 股票的最大利润
- Machine learning compilation lesson 2: tensor program abstraction
- Data verification before and after JSON to map -- custom UDF
- Embedded -arm (bare board development) -1
- What is ROM
猜你喜欢

Jarvis OJ simple network management protocol

【机器人坐标系第一讲】

Embedded-c Language-2

Hiengine: comparable to the local cloud native memory database engine

Jarvis OJ webshell analysis

Summary of PHP pseudo protocol of cisp-pte

Etcd 构建高可用Etcd集群

阈值同态加密在隐私计算中的应用:解读

Error in composer installation: no composer lock file present.

Learnopongl notes (I)
随机推荐
兰空图床苹果快捷指令
Practical example of propeller easydl: automatic scratch recognition of industrial parts
调查显示传统数据安全工具面对勒索软件攻击的失败率高达 60%
Embedded-c Language-3
EasyX second lesson
First day of learning C language
Embedded-c Language-1
PHP人才招聘系统开发 源代码 招聘网站源码二次开发
[Jianzhi offer] 62 The last remaining number in the circle
It is forbidden to copy content JS code on the website page
The second day of learning C language for Asian people
American chips are no longer proud, and Chinese chips have successfully won the first place in emerging fields
浏览器渲染原理以及重排与重绘
Use JDBC technology and MySQL database management system to realize the function of course management, including adding, modifying, querying and deleting course information.
Jarvis OJ webshell analysis
Get ready for the pre-season card game MotoGP ignition champions!
[Web attack and Defense] WAF detection technology map
Jarvis OJ Telnet Protocol
Embedded-c language-6
[729. My Schedule i]