#!/usr/bin/env python

from flask import Flask
import sleipnir

app = Flask(__name__)
app.register_blueprint(sleipnir.v1, url_prefix='/v1')
app.run(debug=True)

@@ -61,83 +61,481 @@
 ir%0A%0A
-app = Flask(__name__)%0Aapp.register_blueprint(sleipnir.v1, url_prefix='/v1')
+# maybe constrain this to known origins to avoid excessive requests%0Acors_origin = '*'%0A%0Aapp = Flask(__name__)%0Aapp.register_blueprint(sleipnir.v1, url_prefix='/v1')%0A%0A@app.after_request%0Adef after_request(response):%0A    response.headers.add('Access-Control-Allow-Origin', cors_origin)%0A    response.headers.add('Access-Control-Allow-Headers', 'Content-Type,Accept,Authorization')%0A    response.headers.add('Access-Control-Allow-Methods', 'GET,POST,OPTIONS')%0A    return response%0A%0A
 %0Aapp

Add CORS support