当前位置:网站首页>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)
边栏推荐
- 【testlink】TestLink1.9.18常见问题解决方法
- Using C language to realize palindrome number
- tf. sequence_ Mask function explanation case
- 拷贝方式之DMA
- SQL injection of cisp-pte (Application of secondary injection)
- 深潜Kotlin协程(二十一):Flow 生命周期函数
- Use JDBC technology and MySQL database management system to realize the function of course management, including adding, modifying, querying and deleting course information.
- 编译libssh2报错找不到openssl
- 【剑指 Offer】61. 扑克牌中的顺子
- PHP talent recruitment system development source code recruitment website source code secondary development
猜你喜欢

Jarvis OJ Flag

Etcd build a highly available etcd cluster

【729. 我的日程安排錶 I】

Copy mode DMA

PHP talent recruitment system development source code recruitment website source code secondary development
![[61dctf]fm](/img/22/3e4e3f1679a27d8b905684bb709905.png)
[61dctf]fm

Cs231n notes (bottom) - applicable to 0 Foundation

Machine learning compilation lesson 2: tensor program abstraction

【剑指 Offer】63. 股票的最大利润

Jarvis OJ 简单网管协议
随机推荐
npm安装
Jarvis OJ shell流量分析
Solution of vant tabbar blocking content
Jarvis OJ 远程登录协议
编译libssh2报错找不到openssl
Deeply cultivate 5g, and smart core continues to promote 5g applications
Games101 notes (III)
【性能测试】全链路压测
Embedded UC (UNIX System Advanced Programming) -2
干货!半监督预训练对话模型 SPACE
[Jianzhi offer] 61 Shunzi in playing cards
Learnopongl notes (I)
[Jianzhi offer] 63 Maximum profit of stock
Android privacy sandbox developer preview 3: privacy, security and personalized experience
The first EMQ in China joined Amazon cloud technology's "startup acceleration - global partner network program"
easyNmon使用汇总
Is it safe to open a securities account by mobile phone? Detailed steps of how to buy stocks
Is it safe to open an account for digging wealth stocks? How is it safe to open a stock account?
【微信小程序】一文读懂小程序的生命周期和路由跳转
How to uninstall MySQL cleanly