Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Heatmap Image URL incorrect when using reverse proxy #23

Open
ClassicGOD opened this issue Jun 21, 2018 · 3 comments
Open

Heatmap Image URL incorrect when using reverse proxy #23

ClassicGOD opened this issue Jun 21, 2018 · 3 comments

Comments

@ClassicGOD
Copy link

My Octoprint instance is behind a Nginx reverse proxy and the heatmap image does not load.
Plugin generates incorrect url ignoring X-Script-Name for example for octoprint installation avaiable under https://myDomain.com/octoprint/ :

url of the image is: https://myDomain.com/plugin/PrusaMeshMap/static/img/heatmap.png

but it should be: https://myDomain.com/octoprint/plugin/PrusaMeshMap/static/img/heatmap.png

@lord-carlos
Copy link

I have this problem as well.

@lord-carlos
Copy link

For now I wrote a rule in nginx to rewrite the URL on the fly:

subs_filter_types text/javascript;
subs_filter 'plugin/PrusaMeshMap' 'XXXX/plugin/PrusaMeshMap' g;

Where XXXX is my Subdirectory.

@ppamidimarri
Copy link

ppamidimarri commented Oct 31, 2018

I think this should fix the problem... #33
Edit: I tested this and it fixes the problem. If you want to fix this problem on your RPi installation, open: /home/pi/oprint/lib/python2.7/site-packages/octoprint_PrusaMeshMap/templates/PrusaMeshMap_tab.jinja2 and change the second line:

<img id="PrusaMeshMap-heatmap" src="/plugin/PrusaMeshMap/static/img/heatmap.png" />

to

<img id="PrusaMeshMap-heatmap" src="plugin/PrusaMeshMap/static/img/heatmap.png" />

and a similar change to the path on line 3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants