paradoxxxzero / butterfly

A web terminal based on websocket and tornado

Home Page:http://paradoxxxzero.github.io/2014/02/28/butterfly.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

--uri-root-path only applies to some things

osmarks opened this issue · comments

I'm trying to run Butterfly under the path /term behind Caddy.
I tried --uri-root-path term, but this doesn't really work, as the actual terminal page is only available at / on the Butterfly side, not /term.
I can use a directive to remove /term from the request sent to Butterfly, and this allows me to access the main page OK, but then the scripts fail to load, as the paths in the HTML file are /term/static/whatever, which have the /term removed by the reverse proxying, meaning that Butterfly receives requests at /static/whatever, which cause 404s.
It also appears that fonts are not loaded with the URL prefix, and neither is a file named "local.js".

Not sure what --uri-root-path is supposed to achieve but it really doesn't work properly and doesnt seem to make sense.

Static gets put under uri_root_path and so does the web socket handler but the main page doesn't?

How should one go about putting butterfly on a subdirectory?