You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When used from slidev, the http-proxy used by express-js drops POST requests that contain a body.
Context:
I'm doing live integration with a jupyter notebook. Slides initially use content that is pre-rendered in the notebook (and that could be exported from it) but are also dynamic and allow to rerun some code etc using a running jupyter notebook.
To limit the development effort, I embed the notebook in an iframe.
This iframe needs to be loaded from the same origin to be fully hackable, so I explored the proxy feature of slidev (that uses vite that uses node-http-proxy in expressjs).
Current state of understanding
I've been exploring using slidev vite.config.ts for some time this afternoon but with only partial success.
I finally realized that serving directly with vite works.
More precisely, through slidev, I can get most requests to be proxied but the POST requests with a body are dropped (never sent to the backend/jupyter server, checked using wireshark).
Using directly vite, with the same config, works for all requests.
My understanding is that it comes from the use of middlewares incompatible with node-http-proxy, the best resources I could find are http-party/node-http-proxy#530 (which points to) http-party/node-http-proxy#180
To Reproduce
Steps to reproduce the behavior (details below):
Start a jupyter notebook
In a slidev project embed it using an iframe
View the slides
The notebook is displayed (proxy working) but not interactive (initial POST request is dumped)
import{defineConfig}from'vite'exportdefaultdefineConfig({publicDir: 'dist',// to serve the "slidev build" resultserver: {// exact same content for the slidev configproxy: {'/nb4slidev': {target: 'http://localhost:8888',ws: true,},},},})
Desktop (please complete the following information):
OS: Linux Manjaro
Browser: tested in both Firefox 96 and Chromium 97
Slidev version: 0.27.16
Vite version: vite/2.5.3 linux-x64 node-v16.6.2
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Uh oh!
There was an error while loading. Please reload this page.
When used from slidev, the http-proxy used by express-js drops POST requests that contain a body.
Context:
I'm doing live integration with a jupyter notebook. Slides initially use content that is pre-rendered in the notebook (and that could be exported from it) but are also dynamic and allow to rerun some code etc using a running jupyter notebook.
To limit the development effort, I embed the notebook in an iframe.
This iframe needs to be loaded from the same origin to be fully hackable, so I explored the proxy feature of slidev (that uses vite that uses node-http-proxy in expressjs).
Current state of understanding
I've been exploring using slidev
vite.config.ts
for some time this afternoon but with only partial success.I finally realized that serving directly with vite works.
More precisely, through slidev, I can get most requests to be proxied but the POST requests with a body are dropped (never sent to the backend/jupyter server, checked using wireshark).
Using directly vite, with the same config, works for all requests.
My understanding is that it comes from the use of middlewares incompatible with node-http-proxy, the best resources I could find are
http-party/node-http-proxy#530 (which points to)
http-party/node-http-proxy#180
To Reproduce
Steps to reproduce the behavior (details below):
Command to start the notebook:
Iframe embedding
Vite config:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: