Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use flask-cors package for CORS; don't use Bokeh anymore. #1378

Merged
merged 2 commits into from
Jan 11, 2016

Conversation

kwmsmith
Copy link
Member

With Bokeh 0.11, the CORS handling was moved. This removes the Bokeh
dependency for this part of Blaze and uses instead a small MIT-licensed
flask extension.

With Bokeh 0.11, the CORS handling was moved.  This removes the Bokeh
dependency for this part of Blaze and uses instead a small MIT-licensed
flask extension.
@kwmsmith kwmsmith added this to the 0.9.1 milestone Jan 11, 2016
@kwmsmith
Copy link
Member Author

@ltransom @johneo Can you please review?

@@ -219,7 +209,7 @@ def run(self, port=DEFAULT_PORT, retry=False, **kwargs):


@api.route('/datashape', methods=['GET'])
@crossdomain(origin='*', methods=['GET'])
@cross_origin(origins='*', methods=['GET'])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to consider if we want to let any and all browser content to load from the Blaze server, as the * essentially defeats the cross-origin content loading protection. Might want to eventually move toward making this configurable or default to localhost:6363?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in agreement with you; this PR is scoped to just reproduce the current functionality with the flask-cors extension. I'll make a separate feature request for making this configurable.

@johneo
Copy link

johneo commented Jan 11, 2016

Looks good!

kwmsmith added a commit that referenced this pull request Jan 11, 2016
Use flask-cors package for CORS; don't use Bokeh anymore.
@kwmsmith kwmsmith merged commit 34f7a37 into blaze:master Jan 11, 2016
@kwmsmith kwmsmith deleted the bugfix/remove-bokeh-crossorigin branch January 11, 2016 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants