当前位置:网站首页>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)
边栏推荐
- It is forbidden to copy content JS code on the website page
- thinkphp模板的使用
- Embedded-c Language-5
- 【7.7直播预告】《SaaS云原生应用典型架构》大咖讲师教你轻松构建云原生SaaS化应用,难题一一击破,更有华为周边好礼等你领!
- Jarvis OJ shell流量分析
- Read the basic grammar of C language in one article
- Yarn common commands
- Timestamp strtotime the day before or after the date
- Benji Banas membership pass holders' second quarter reward activities update list
- Raspberry pie 4B installation pytorch1.11
猜你喜欢
The first EMQ in China joined Amazon cloud technology's "startup acceleration - global partner network program"
【jmeter】jmeter脚本高级写法:接口自动化脚本内全部为变量,参数(参数可jenkins配置),函数等实现完整业务流测试
拷贝方式之DMA
项目引入jar从私服Nexus 拉去遇到的一个问题
Bs-xx-042 implementation of personnel management system based on SSM
腾讯音乐上线新产品“曲易买”,提供音乐商用版权授权
The survey shows that the failure rate of traditional data security tools in the face of blackmail software attacks is as high as 60%
Use JDBC technology and MySQL database management system to realize the function of course management, including adding, modifying, querying and deleting course information.
深耕5G,芯讯通持续推动5G应用百花齐放
【Web攻防】WAF检测技术图谱
随机推荐
网上办理期货开户安全吗?网上会不会骗子比较多?感觉不太靠谱?
What is ROM
Precision epidemic prevention has a "sharp weapon" | smart core helps digital sentinels escort the resumption of the city
Get ready for the pre-season card game MotoGP ignition champions!
张平安:加快云上数字创新,共建产业智慧生态
npm安装
Embedded -arm (bare board development) -2
thinkphp模板的使用
Jarvis OJ Telnet Protocol
[Jianzhi offer] 66 Build product array
[team PK competition] the task of this week has been opened | question answering challenge to consolidate the knowledge of commodity details
SQL injection of cisp-pte (Application of secondary injection)
Deep learning plus
关于new Map( )还有哪些是你不知道的
什么是ROM
Browser rendering principle and rearrangement and redrawing
Solution of vant tabbar blocking content
C# TCP如何设置心跳数据包,才显得优雅呢?
NPM installation
7.Scala类