当前位置:网站首页>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)
边栏推荐
- Basic introduction to the control of the row component displaying its children in the horizontal array (tutorial includes source code)
- thinkphp3.2.3
- 阈值同态加密在隐私计算中的应用:解读
- Is it safe to open futures accounts online? Will there be more liars online? Doesn't feel very reliable?
- Timestamp strtotime the day before or after the date
- Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
- 齐宣王典故
- Flet tutorial 12 stack overlapping to build a basic introduction to graphic and text mixing (tutorial includes source code)
- 微信公众号网页授权登录实现起来如此简单
- Keras crash Guide
猜你喜欢
干货!半监督预训练对话模型 SPACE
Games101 notes (III)
Jarvis OJ shell traffic analysis
[Web attack and Defense] WAF detection technology map
The first EMQ in China joined Amazon cloud technology's "startup acceleration - global partner network program"
Etcd 构建高可用Etcd集群
Copy mode DMA
The survey shows that the failure rate of traditional data security tools in the face of blackmail software attacks is as high as 60%
中国广电正式推出5G服务,中国移动赶紧推出免费服务挽留用户
[Jianzhi offer] 63 Maximum profit of stock
随机推荐
npm安装
[wechat applet] read the life cycle and route jump of the applet
Detailed explanation of printf() and scanf() functions of C language
编译libssh2报错找不到openssl
2022 年 Q2 加密市场投融资报告:GameFi 成为投资关键词
叩富网开期货账户安全可靠吗?怎么分辨平台是否安全?
SQL injection of cisp-pte (Application of secondary injection)
thinkphp3.2.3
精准防疫有“利器”| 芯讯通助力数字哨兵护航复市
Benji Banas membership pass holders' second quarter reward activities update list
ECU简介
Thoughtworks 全球CTO:按需求构建架构,过度工程只会“劳民伤财”
Embedded-c Language-4
Machine learning compilation lesson 2: tensor program abstraction
The first EMQ in China joined Amazon cloud technology's "startup acceleration - global partner network program"
[61dctf]fm
Embedded -arm (bare board development) -2
Jarvis OJ shell流量分析
麻烦问下,DMS中使用Redis语法是以云数据库Redis社区版的命令为参考的嘛
First day of learning C language