From 1db40c80b64cd95a6653add6a6d4fad246f58456 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Wed, 13 Jan 2016 00:08:47 +0100 Subject: [PATCH] Add CORS. --- accountant/api/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/accountant/api/__init__.py b/accountant/api/__init__.py index cafdede..b4ff6b7 100644 --- a/accountant/api/__init__.py +++ b/accountant/api/__init__.py @@ -15,10 +15,14 @@ along with Accountant. If not, see . """ from flask import Blueprint + from flask.ext.restful import Api +from flask.ext.cors import CORS blueprint = Blueprint('api', __name__) api = Api(blueprint) +CORS(blueprint) + # Load all views. from .views import *