question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs for personal BinderHub CORS setup

See original GitHub issue

Proposed change

Consolidated documentation for setting up CORS headers on personal BinderHub deployments with helm.

Alternative options

Leave the documentation as it is - and I will just be grateful for an already awesome tool!

Who would use this feature?

Anyone wishing to connect to a personal BinderHub deployment via clients that rely on CORS requests, like Juniper.

(Optional): Suggest a solution

My knowledge of CORS headers, etc. is quite limited. But as far as I have pieced together from the MyBinder deployment config/ other Github issues, the following minimal additions must be added to config.yaml:

binderhub:
  cors: &cors
    allowOrigin: "*"

  jupyterhub:
    custom:
      cors: *cors

And I remember reading a comment somewhere from @minrk that only authenticated requests are supposed to work with cors, so maybe the authentication options should also be added?

If I ever get my own cors setup to work, I would be happy to contribute this section to the documentation myself. Unfortunately, my naive attempts with the above options have failed so far. For reference, I am trying to use juniper on this page to connect to this binder. For debugging, the page console is logging connection events as experienced by juniper, which is where I’m seeing the CORS error. I’m not giving up, but maybe someone has some helpful tips in the meantime.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TomasBeuzencommented, Sep 25, 2020

Sure sounds good

1reaction
betatimcommented, Sep 25, 2020

Do you want to make a separate PR for the CORS documentation? In general smaller PRs or PRs that touch only one topic are easier and faster to review than bigger ones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling CORS — BinderHub documentation - Read the Docs
Cross-Origin Resource Sharing (CORS) is a mechanism that gives a web application running at one origin, access to resources from a different origin....
Read more >
Secure with HTTPS — BinderHub documentation
To enable HTTPS on your BinderHub you can setup an ingress proxy and configure it to serve both, the Binder and JupyterHub interface,...
Read more >
Enabling Authentication — BinderHub documentation
In order to enable authentication for BinderHub by using JupyterHub as an oauth provider, you need to add the following into config.yaml :....
Read more >
3. Set up BinderHub
First we'll create a folder where we'll store our BinderHub configuration files. You can do so with the following commands: mkdir binderhub cd...
Read more >
Customize and Maintain — BinderHub documentation
Adjusting BinderHub config to enable CORS · previous. 4. Tear down your Binder deployment · next. Customizing your BinderHub deployment.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found