Enabled CORS on /api routes
This commit is contained in:
parent
ba4599d4a3
commit
8170726430
1 changed files with 4 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ from flask import (
|
|||
from flask.views import MethodView
|
||||
from werkzeug.exceptions import default_exceptions
|
||||
|
||||
from flask_cors import CORS
|
||||
|
||||
from openflexure_microscope.api.utilities import list_routes
|
||||
|
||||
from openflexure_microscope import Microscope, config
|
||||
|
|
@ -47,6 +49,8 @@ def uri(suffix, api_version, base=None):
|
|||
app = Flask(__name__)
|
||||
app.url_map.strict_slashes = False
|
||||
|
||||
CORS(app, resources=r'/api/*')
|
||||
|
||||
|
||||
# Make errors more API friendly
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue