Skip to content

Commit

Permalink
Use credentialless over require-corp
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed May 12, 2024
1 parent d6dd0fb commit 9e39de2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ These models are not vetted for accuracy nor propriety and should not be deploye
- `jupyter-server` to enable additional headers (`jupyverse` and `jupyterlite` not tested yet)

When this extension is enabled, the server will return additional headers,
which will prevent fetching external resources, for example the extension logos
from GitHub will no longer load in the extension panel.
which may limit fetching external resources.

The additional headers are used to enable synchronous communication with WebWorker via `SharedArrayBuffer`:

```http
Cross-Origin-Opener-Policy: same-origin,
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Embedder-Policy: credentialless
```

## Install
Expand Down
2 changes: 1 addition & 1 deletion jupyterlab_transformers_completer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _load_jupyter_server_extension(server_app):
server_app.web_app.settings["headers"].update({
# Allow access to `SharedArrayBuffer`.
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
"Cross-Origin-Embedder-Policy": "credentialless",
})
name = "@jupyterlab/transformers-completer"
server_app.log.info(f"Registered {name} server extension")
Expand Down

0 comments on commit 9e39de2

Please sign in to comment.