当前位置:网站首页>Flask solves the problem of CORS err
Flask solves the problem of CORS err
2022-07-05 17:24:00 【go_ flush】
- First of all , You have to make sure your nginx Has been configured to allow cross domain
for example :
stay location Add the following :
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE;
Then install flask Solve cross domain packages
pip install flask_corsHow to use it is as follows :
from flask_cors import CORS
app = Flask(__name__)
CORS(app,supports_credentials=True)
边栏推荐
- NPM installation
- ThoughtWorks global CTO: build the architecture according to needs, and excessive engineering will only "waste people and money"
- C (WinForm) the current thread is not in a single threaded unit, so ActiveX controls cannot be instantiated
- Practical example of propeller easydl: automatic scratch recognition of industrial parts
- Rider 设置选中单词侧边高亮,去除警告建议高亮
- EasyX second lesson
- IDC报告:腾讯云数据库稳居关系型数据库市场TOP 2!
- URP下Alpha从Gamma空间到Linner空间转换(二)——多Alpha贴图叠加
- 7. Scala class
- Understand the usage of functions and methods in go language
猜你喜欢
Complete solution instance of Oracle shrink table space
Rider 设置选中单词侧边高亮,去除警告建议高亮
7.Scala类
First day of learning C language
Winedt common shortcut key modify shortcut key latex compile button
thinkphp3.2.3
Embedded -arm (bare board development) -1
mysql中取出json字段的小技巧
Tips for extracting JSON fields from MySQL
兰空图床苹果快捷指令
随机推荐
Excuse me, is the redis syntax used in DMS based on the commands of the redis community version of the cloud database
C # realizes crystal report binding data and printing 3-qr code barcode
Flow characteristics of kitchen knife, ant sword, ice scorpion and Godzilla
Use of ThinkPHP template
[Web attack and Defense] WAF detection technology map
Matery主题自定义(一)黑夜模式
[Jianzhi offer] 62 The last remaining number in the circle
ECU introduction
2022 年 Q2 加密市场投融资报告:GameFi 成为投资关键词
Error in composer installation: no composer lock file present.
mysql5.6解析JSON字符串方式(支持复杂的嵌套格式)
Example tutorial of SQL deduplication
C#(Winform) 当前线程不在单线程单元中,因此无法实例化 ActiveX 控件
Understand the usage of functions and methods in go language
蚂蚁金服的暴富还未开始,Zoom的神话却仍在继续!
Use byte stream to read Chinese from file to console display
How MySQL uses JSON_ Extract() takes JSON value
EasyX second lesson
Deeply cultivate 5g, and smart core continues to promote 5g applications
Summary of optimization scheme for implementing delay queue based on redis