Skip to content

Commit 2b414f0

Browse files
committed
add CORS
1 parent fa85370 commit 2b414f0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

webService/app/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# -*- coding: utf-8 -*-
22
from flask import Flask
3+
from flask_cors import CORS
34

45
from . import settings
56
from .module_one import module_one
67

78
# create app
89
app = Flask(__name__)
10+
CORS(app)
911
app.config['MAX_CONTENT_LENGTH'] = 3 * 1024 * 1024
1012
app.config.from_object(settings)
1113

webService/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dlib==19.7.0
44
face-recognition==1.0.0
55
face-recognition-models==0.3.0
66
Flask==0.12.2
7+
Flask-Cors==3.0.3
78
itsdangerous==0.24
89
Jinja2==2.10
910
MarkupSafe==1.0
@@ -12,4 +13,5 @@ numpy==1.13.3
1213
olefile==0.44
1314
Pillow==4.3.0
1415
scipy==1.0.0
16+
six==1.11.0
1517
Werkzeug==0.12.2

0 commit comments

Comments
 (0)