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

jupyter_server: use server to serve static pages #231

Closed
oliver-sanders opened this issue Jul 30, 2021 · 0 comments
Closed

jupyter_server: use server to serve static pages #231

oliver-sanders opened this issue Jul 30, 2021 · 0 comments

Comments

@oliver-sanders
Copy link
Member

oliver-sanders commented Jul 30, 2021

follow on from: #230

As of #230 we use our own "StaticHandler" to serve the static files (i.e. the Cylc UI).

This approach has it's caveats:

  • Redirection to hub login pages doesn't work for static paths.
  • Another redirection used to "authorise" Jupyter Hub to see your credentials (which can then be used for authentication) also doesn't work.

The Jupyter Server way is to provide the path to these files to the server and have the server's own handler do the leg work.

I had a go at this, however, ran into issues. Tornado doesn't like you overriding its get method to patch in authentication (which would allow redirection to the Hub login pages). I think my issues may have been related to https://github.com/jupyter-server/jupyter_server/issues/ 551?

Pull requests welcome!

@oliver-sanders oliver-sanders added this to the cylc-uiserver 0.6.0 milestone Jul 30, 2021
@oliver-sanders oliver-sanders mentioned this issue Jul 30, 2021
7 tasks
oliver-sanders added a commit to oliver-sanders/cylc-uiserver that referenced this issue Aug 24, 2021
* Closes cylc#231
* Provide our own static handler rather than using Jupyter Server.
* This is because we are not using the same template/static resource approach.
* We would have to edit URLs in the UI to point at `static/cylc/*`.
* Adding authentication here provides login redirection.
@kinow kinow closed this as completed in 5da6044 Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant