当前位置:网站首页>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)
边栏推荐
- Deeply cultivate 5g, and smart core continues to promote 5g applications
- Jarvis OJ webshell analysis
- Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
- PHP strict mode
- The two ways of domestic chip industry chain go hand in hand. ASML really panicked and increased cooperation on a large scale
- Practical example of propeller easydl: automatic scratch recognition of industrial parts
- thinkphp3.2.3
- Jarvis OJ Webshell分析
- Bs-xx-042 implementation of personnel management system based on SSM
- 腾讯音乐上线新产品“曲易买”,提供音乐商用版权授权
猜你喜欢

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

Deep dive kotlin synergy (XXI): flow life cycle function

兰空图床苹果快捷指令

Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022

Cs231n notes (bottom) - applicable to 0 Foundation

thinkphp模板的使用

Android privacy sandbox developer preview 3: privacy, security and personalized experience

浏览器渲染原理以及重排与重绘

Judge whether a number is a prime number (prime number)

Deep learning plus
随机推荐
Deeply cultivate 5g, and smart core continues to promote 5g applications
How can C TCP set heartbeat packets to be elegant?
Basic introduction to the control of the row component displaying its children in the horizontal array (tutorial includes source code)
机器学习编译第2讲:张量程序抽象
Can you help me see what the problem is? [ERROR] Could not execute SQL stateme
Error in composer installation: no composer lock file present.
Raspberry pie 4B installation pytorch1.11
Detailed explanation of printf() and scanf() functions of C language
【testlink】TestLink1.9.18常见问题解决方法
干货!半监督预训练对话模型 SPACE
【机器人坐标系第一讲】
easyNmon使用汇总
飞桨EasyDL实操范例:工业零件划痕自动识别
The survey shows that the failure rate of traditional data security tools in the face of blackmail software attacks is as high as 60%
Summary of PHP pseudo protocol of cisp-pte
Is it safe to open an account for digging wealth stocks? How is it safe to open a stock account?
深潜Kotlin协程(二十一):Flow 生命周期函数
If you can't afford a real cat, you can use code to suck cats -unity particles to draw cats
Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
Writing method of twig array merging