x

package
v0.2.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const WellKnownHealthPath = "/.well-known/health"

Variables

This section is empty.

Functions

func Jupyter added in v0.2.8

func Jupyter(next http.Handler) http.Handler

VSCode web edition makes cors request to /hub/api endpoint in order to determine if the backend api is a JupyterHub or JupyterLab/JupyterServer

If the Access-Control-Allow-Origin header is absent, the request will not make through. Here we add this header to make VSCode web happy

Tested on: - github.dev - vscode.dev - insider.vscode.dev

Needs to have Jupyter extension installed

- /login is used to check if server has authentication enabled - /hub/api is used to check if server is JupyterHub

with authentication disabled, the /login endpoint won't respond with cors header so we need to manually add it to make vscode-web happy

jupyter server doesn't have the /hub/api endpoint, so the same hack needs to be applied

func ReverseProxy added in v0.1.9

func ReverseProxy(addr string) http.Handler

func WellKnownHealthMiddleware

func WellKnownHealthMiddleware(next http.Handler) http.Handler

Types

type AugmentedHandler

type AugmentedHandler interface {
	http.Handler
	PkgPath() string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL