jneilliii / OctoPrint-BedReady

11 stars 3 forks source link

Adjustable base URL #8

Closed PeterDarley closed 2 years ago

PeterDarley commented 2 years ago

I'm using a reverse proxy to get to my pi, so the path to the images are wrong. Instead of: xxx/plugin/bedready/images/reference.jpg it should be: xxx/isis/plugin/bedready/images/reference.jpg

Would it be possible to add a base URL for the images, similar to how Octoprint deals with the Webcam URLs?

jneilliii commented 2 years ago

I think this would be fairly easy to fix by removing the leading / in the URL that's being used to make it a relative URL. Pretty sure I fixed multi-instance setups in Slicer Thumbnails plugin that way.

PeterDarley commented 2 years ago

I'm not sure. I think you'd get the tab info in the URL, which might not work. So you'd end up with something like: xxx/yyy/#control/plugin/bedready/images/reference.jpg instead of xxx/yyy/plugin/bedready/images/reference.jpg

jneilliii commented 2 years ago

I think the browser might be smart enough to work around html anchors like that. I'll make the adjustments tonight and release a new version if it works as expected.

PeterDarley commented 2 years ago

I just tried it by adding /plugin/bedready/images/reference.jpg after #control, and it gets truncated after #control. When I take the #control out it works as expected.

jneilliii commented 2 years ago

just released 0.1.4 that should fix this. you'll need to retake the reference image or manually update the settings in config.yaml.

PeterDarley commented 2 years ago

Thanks for doing that!