Open ClassicGOD opened 6 years ago
I have this problem as well.
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.
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.
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