You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spot.apache.org by na...@apache.org on 2018/01/10 02:08:21 UTC

[1/3] incubator-spot git commit: Add flask-cors to requirements.txt

Repository: incubator-spot
Updated Branches:
  refs/heads/SPOT-181_ODM b896a92d0 -> a263e90dc


Add flask-cors to requirements.txt


Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/00a03482
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/00a03482
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/00a03482

Branch: refs/heads/SPOT-181_ODM
Commit: 00a034821078683c8929c43d519a5bd619d7e517
Parents: d923259
Author: Tadd Wood <ta...@arcadiadata.com>
Authored: Fri Dec 29 00:19:39 2017 -0600
Committer: Tadd Wood <ta...@arcadiadata.com>
Committed: Fri Dec 29 00:19:39 2017 -0600

----------------------------------------------------------------------
 spot-oa/requirements.txt | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/00a03482/spot-oa/requirements.txt
----------------------------------------------------------------------
diff --git a/spot-oa/requirements.txt b/spot-oa/requirements.txt
index 9f3afb8..5461aae 100644
--- a/spot-oa/requirements.txt
+++ b/spot-oa/requirements.txt
@@ -16,6 +16,7 @@ ipython == 3.2.1
 # GraphQL API dependencies
 flask
 flask-graphql
+flask-cors
 graphql-core
 urllib3
 


[2/3] incubator-spot git commit: Add CORS configuration to GraphQL web app setup

Posted by na...@apache.org.
Add CORS configuration to GraphQL web app setup

Flask Blueprint now uses CORS, and also allows the user to configure specific origins for requesting resources, which can be set in spot.conf.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/3441854f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/3441854f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/3441854f

Branch: refs/heads/SPOT-181_ODM
Commit: 3441854f30c0593f427aac0ec93bf79141e63a78
Parents: 00a0348
Author: Tadd Wood <ta...@arcadiadata.com>
Authored: Fri Dec 29 00:24:03 2017 -0600
Committer: Tadd Wood <ta...@arcadiadata.com>
Committed: Fri Dec 29 00:24:03 2017 -0600

----------------------------------------------------------------------
 spot-oa/api/graphql/webapp.py |  5 +++++
 spot-setup/spot.conf          | 12 ++++++++++++
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/3441854f/spot-oa/api/graphql/webapp.py
----------------------------------------------------------------------
diff --git a/spot-oa/api/graphql/webapp.py b/spot-oa/api/graphql/webapp.py
index 5a4bd23..73b4bcd 100644
--- a/spot-oa/api/graphql/webapp.py
+++ b/spot-oa/api/graphql/webapp.py
@@ -22,6 +22,7 @@ if __name__=='__main__':
 
 from flask import Flask, Blueprint
 from flask_graphql import GraphQLView
+from flask_cors import CORS
 import os
 
 from schema import SpotSchema
@@ -33,6 +34,10 @@ blueprint.add_url_rule('/graphql', strict_slashes=False, view_func=GraphQLView.a
 
 app.register_blueprint(blueprint)
 
+# Configure CORS
+origins = os.environ.get('ACCESS_CONTROL_ALLOW_ORIGIN').split(",")
+CORS(app, origins=origins)
+
 if __name__=='__main__':
     port = int(sys.argv[1]) if len(sys.argv)>1 else 8889
 

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/3441854f/spot-setup/spot.conf
----------------------------------------------------------------------
diff --git a/spot-setup/spot.conf b/spot-setup/spot.conf
index a0cba3d..50bd851 100755
--- a/spot-setup/spot.conf
+++ b/spot-setup/spot.conf
@@ -60,3 +60,15 @@ PRECISION='64'
 TOL='1e-6'
 TOPIC_COUNT=20
 DUPFACTOR=1000
+
+# API CORS Options
+#
+#   ACCESS_CONTROL_ALLOW_ORIGIN:
+#       Configuration type: string or comma seperated list
+#
+#   Examples:
+#   '*' = Allow any origin (Default)
+#   'http://trustedresource.com' = Allow specific origin
+#   'http://trustedresource.com,http://anothertrustedresource.com' = Allow multiple origins
+#
+ACCESS_CONTROL_ALLOW_ORIGIN='*'
\ No newline at end of file


[3/3] incubator-spot git commit: Merge branch 'SPOT-181_ODM' into pr/130, SPOT-244 aims to close apache/incubator-spot#130

Posted by na...@apache.org.
Merge branch 'SPOT-181_ODM' into pr/130, SPOT-244 aims to close apache/incubator-spot#130


Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/a263e90d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/a263e90d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/a263e90d

Branch: refs/heads/SPOT-181_ODM
Commit: a263e90dc144fe870d0a02b3765cd92ed1918003
Parents: 3441854 b896a92
Author: natedogs911 <na...@gmail.com>
Authored: Tue Jan 9 14:26:03 2018 -0800
Committer: natedogs911 <na...@gmail.com>
Committed: Tue Jan 9 14:26:03 2018 -0800

----------------------------------------------------------------------
 docs/open-data-model.md | 4044 +++++++++++++++++++++++++++++++++---------
 1 file changed, 3231 insertions(+), 813 deletions(-)
----------------------------------------------------------------------