[go: nahoru, domu]

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

Enable CORS for tus uploads. #14282

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

blankenberg
Copy link
Member

Requires: mvdbeek/tusfilter#1

Adds CORS handling to TUS uploads.

TODO: Consider adding separate config setting for uploads allowed_upload_origin_hostnames, that could be made looser than other settings (e.g. '*'), with fall back to allowed_origin_hostnames, so that other Browser-based applications are able to upload datasets.

Example application is GiN (Galaxy in Notebooks), which can upload datasets from a User's computer to Galaxy via JS in a Jupyter Notebook: data is sent from user's computer directly to Galaxy, using credentials provided to GiN. Otherwise, datasets would need to be transferred from User's computer to Jupyter server, then sent e.g. via python/CURL/etc, to the Galaxy server, in order to get around CORS.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

@mvdbeek
Copy link
Member
mvdbeek commented Jul 11, 2022

Can you try moving the regular FastAPI CORS middleware after mounting the WSGI app (https://github.com/mvdbeek/galaxy/blob/5f815cd8eab8728651f5ce9da01fe0041abec919/lib/galaxy/webapps/galaxy/fast_app.py#L131-L148, add_middleware puts the last middleware first ....) ? I think that should work too.

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.

None yet

2 participants