当前位置:网站首页>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)
边栏推荐
- goto Statement
- 漫画:寻找无序数组的第k大元素(修订版)
- 通过proc接口调试内核代码
- [binary tree] insufficient nodes on the root to leaf path
- Browser rendering principle and rearrangement and redrawing
- About JSON parsing function JSON in MySQL_ EXTRACT
- Embedded-c language-6
- Matery主题自定义(一)黑夜模式
- Thoughtworks 全球CTO:按需求构建架构,过度工程只会“劳民伤财”
- CMake教程Step3(添加库的使用要求)
猜你喜欢

Rider set the highlighted side of the selected word, remove the warning and suggest highlighting
SQL删除重复数据的实例教程

Use JDBC technology and MySQL database management system to realize the function of course management, including adding, modifying, querying and deleting course information.

机器学习02:模型评估

Error in composer installation: no composer lock file present.

CMake教程Step4(安装和测试)

thinkphp3.2.3
Oracle缩表空间的完整解决实例

Embedded UC (UNIX System Advanced Programming) -2

Etcd build a highly available etcd cluster
随机推荐
CMake教程Step6(添加自定义命令和生成文件)
Wechat official account web page authorization login is so simple
Wsl2.0 installation
thinkphp模板的使用
Copy mode DMA
WR | 西湖大学鞠峰组揭示微塑料污染对人工湿地菌群与脱氮功能的影响
[wechat applet] read the life cycle and route jump of the applet
【Web攻防】WAF检测技术图谱
域名解析,反向域名解析nbtstat
Read the basic grammar of C language in one article
33: Chapter 3: develop pass service: 16: use redis to cache user information; (to reduce the pressure on the database)
mysql5.6解析JSON字符串方式(支持复杂的嵌套格式)
How to write a full score project document | acquisition technology
漫画:寻找股票买入卖出的最佳时机
mysql如何使用JSON_EXTRACT()取json值
关于mysql中的json解析函数JSON_EXTRACT
Detailed explanation of printf() and scanf() functions of C language
MySql 查询符合条件的最新数据行
About JSON parsing function JSON in MySQL_ EXTRACT
Embedded-c Language-5