当前位置:网站首页>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)
边栏推荐
- Copy mode DMA
- Solution of vant tabbar blocking content
- Jarvis OJ shell流量分析
- 调查显示传统数据安全工具面对勒索软件攻击的失败率高达 60%
- C# TCP如何设置心跳数据包,才显得优雅呢?
- 通过proc接口调试内核代码
- The two ways of domestic chip industry chain go hand in hand. ASML really panicked and increased cooperation on a large scale
- Bs-xx-042 implementation of personnel management system based on SSM
- [Web attack and Defense] WAF detection technology map
- Jarvis OJ simple network management protocol
猜你喜欢
随机推荐
[61dctf]fm
Games101 notes (I)
腾讯音乐上线新产品“曲易买”,提供音乐商用版权授权
Machine learning compilation lesson 2: tensor program abstraction
If you can't afford a real cat, you can use code to suck cats -unity particles to draw cats
【7.7直播预告】《SaaS云原生应用典型架构》大咖讲师教你轻松构建云原生SaaS化应用,难题一一击破,更有华为周边好礼等你领!
Wsl2.0 installation
激动人心!2022开放原子全球开源峰会报名火热开启!
Detailed explanation of printf() and scanf() functions of C language
Read the basic grammar of C language in one article
手机开证券账户安全吗?怎么买股票详细步骤
Embedded UC (UNIX System Advanced Programming) -1
外盘期货平台如何辨别正规安全?
[Jianzhi offer] 61 Shunzi in playing cards
thinkphp模板的使用
It is forbidden to copy content JS code on the website page
7.Scala类
采用药丸屏的iPhone14或引发中国消费者的热烈抢购
Fleet tutorial 09 basic introduction to navigationrail (tutorial includes source code)
拷贝方式之DMA









![[Web attack and Defense] WAF detection technology map](/img/7c/60a25764950668ae454b2bc08fe57e.png)