Commit 6dc020b1 authored by Luís de Sousa's avatar Luís de Sousa
Browse files

Applying CORS to all resources.

parent ab15d311
#https://github.com/humiaozuzu/awesome-flask #https://github.com/humiaozuzu/awesome-flask
from flask import Flask,make_response from flask import Flask,make_response
from flask_restful import Api from flask_restful import Api
from flask_cors import CORS
from resources.meta import Monoliths,Monolith,MonolithRoot from resources.meta import Monoliths,Monolith,MonolithRoot
import logging,os.path import logging,os.path
#from flask import Flask
app = Flask(__name__) app = Flask(__name__)
CORS(app, resources={r"/*": {'origins': '*'}})
api = Api(app) api = Api(app)
basePath=os.path.dirname(__file__) basePath=os.path.dirname(__file__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment