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

Sources behind proxy #934 #1038

Merged
merged 5 commits into from
Jun 18, 2023
Merged

Sources behind proxy #934 #1038

merged 5 commits into from
Jun 18, 2023

Conversation

falkoschindler
Copy link
Contributor

This PR adds the windows.path_prefix to the src prop of ui.audio, ui.video, ui.interactive_image and ui.image.

How can we test it?

@falkoschindler falkoschindler self-assigned this Jun 16, 2023
@falkoschindler falkoschindler added this to the 1.2.21 milestone Jun 16, 2023
@falkoschindler falkoschindler linked an issue Jun 16, 2023 that may be closed by this pull request
4 tasks
@rodja rodja modified the milestones: 1.2.21, 1.2.22 Jun 17, 2023
@rodja
Copy link
Member

rodja commented Jun 17, 2023

ui.video and ui.audio work as expected. But ui.image creates a js error with the missing prefix before loading correctly. And ui.interactive_image shows the js error compute_src is not defined.

Tested setup:

  1. create a test.py with the demos
  2. edit docker-compose.yml to use command: "./test.py"
  3. start containers with ./docker.sh U
  4. access http://localhost:8888/app

@falkoschindler
Copy link
Contributor Author

Ok, there was an obvious bug in interactive_image.
But there are still requests causing a 404. It seems to affect both ui.image and ui.interactive_image. (Make sure to use different images and disable the cache to let the browser download both images if testing multiple UI elements at once.)

@falkoschindler
Copy link
Contributor Author

I think I fixed it by setting the initial computed_src to undefined. This way the browser only sends a request when the source is actually computed.

@rodja rodja merged commit 66f1b11 into main Jun 18, 2023
7 checks passed
@rodja rodja deleted the sources-behind-proxy branch June 18, 2023 02:43
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.

absolute sources behind "reverse proxy with subpath" does not work
2 participants