Enable CORS (cross origin resource sharing) with Flask

Published: 07 May 2023
on channel: Demos Petsas
997
16

In this flask CORS tutorial we will learn how to use flask-cors a Flask package for adding Access-Control-Allow-Origin headers to your API in order to be able to consume it from your frontend when they are on different origins that is have either a different host, port or scheme.

Chapters:
0:00 Intro
0:26 Install flask-cors
1:06 Add extension
1:13 Initialise extension
2:03 Customise origins and endpoints
3:49 Using the cross_origin decorator

Code:
https://github.com/demoskp/flask-cors...

Personal website:
http://www.petsas.consulting


Watch video Enable CORS (cross origin resource sharing) with Flask online without registration, duration hours minute second in high quality. This video was added by user Demos Petsas 07 May 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 99 once and liked it 1 people.