Mojolicious 不加载绝对 javascript 和 CSS 文件

Mojolicious doesn't load absolute javascript and CSS files

我正在尝试使用 Gnuplot 创建 "canvas" HTML 文档。当我将一个放入 public/ 时,Mojolicious 在 /usr/share/gnuplot/gnuplot/5.2/js 中的 javascript 和 CSS 文件上生成 404。在不修改 HTML 输出的情况下,如何才能正确加载这些文件?

HTML内容:

<!DOCTYPE HTML>
<html>
<head>
<title>Gnuplot Canvas Graph</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->
<script src="/usr/share/gnuplot/gnuplot/5.2/js/canvastext.js"></script>
<script src="/usr/share/gnuplot/gnuplot/5.2/js/gnuplot_common.js"></script>
<script src="/usr/share/gnuplot/gnuplot/5.2/js/gnuplot_dashedlines.js"></script>
...
</html>

可恶的错误:

[2019-04-02 16:02:55.54125] [10258] [debug] GET "/usr/share/gnuplot/gnuplot/5.2/js/canvastext.js" (f301442a)
[2019-04-02 16:02:55.54202] [10258] [debug] Template "not_found.development.html.ep" not found
[2019-04-02 16:02:55.54218] [10258] [debug] Template "not_found.html.ep" not found
[2019-04-02 16:02:55.54228] [10258] [debug] Rendering cached template "mojo/debug.html.ep"
[2019-04-02 16:02:55.54337] [10258] [debug] Rendering cached template "mojo/menubar.html.ep"
[2019-04-02 16:02:55.54890] [10258] [debug] 404 Not Found (0.007638s, 130.924/s)

我知道它将这些文件路径转换为 ​​URL,但我不知道如何解决这个问题。

gnuplot canvas 终端有一个选项 "jsdir" 正是因为这个原因:

gnuplot> set term canvas jsdir 'http://wherever/the/scripts/live/'

输出 *.html 然后包含类似

的行
<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->
<script src="http://wherever/the/scripts/live/canvasmath.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_common.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_dashedlines.js"></script>
<script src="http://wherever/the/scripts/live/gnuplot_mouse.js"></script>