Skip to content

Use pyodide_http.patch_all() instead of patch_urllib() #4488

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlosefr
Copy link

HTTP requests done from a Marimo WASM notebook are not carrying any cookies that the browser may have stored. This breaks requests to URLs that use cookie-based authentication (e.g. where the user authenticates in another browser tab/window, like URLs protected by Cloudflare Access).

The underlying issue is the lack of the proper credential flags for XMLHttpRequest in pyodide-http and urllib3, and I've opened pull-requests for both of those projects:

However, Marimo is only patching network calls for the standard library'surllib, and it should be patching all calls that pyodide-http knows about. If so, then only the pyodide-http change is necessary to have HTTP requests from Marimo start carrying (implicit) cookies.

See "cookies in wasm" thread on Discord: https://discord.com/channels/1059888774789730424/1358809549187977518

Copy link

vercel bot commented Apr 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:17pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:17pm

Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@carlosefr
Copy link
Author

I have read the CLA Document and I hereby sign the CLA.

@akshayka
Copy link
Contributor

/marimo create-test-release

Copy link

github-actions bot commented Apr 11, 2025

🚀 Test release published. You may be able to view the changes at https://marimo.app?v=0.12.8-dev98388

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

Successfully merging this pull request may close these issues.

2 participants