作者:蓝色流星魂 | 来源:互联网 | 2023-09-08 19:31
Currently the font roboto css style
url has a leading
, which results font access url from root path. Even with a
1
| --path_prefix=/path/to/tensorboard/ |
, the font url is still from root path, unchanged. e.g,
1
| http://host:6006/font-roboto/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2 |
.
Thus, the tensorboard from
1
| http://host:6006/path/to/tensorboard/ |
gives 404 errors with the font url.
The CSS codes are as below, the leading
in
needs to be stripped to render from relative path
1
| http://host:6006/path/to/tensorboard/font-roboto/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2 |
.
1 2 3 4 5 6 7 8
| css
-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/font-roboto/uYECMKoHcO9x1wdmbyHIm3-_kf6ByYO6CLYdB4HQE-Y.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} |
该提问来源于开源项目:tensorflow/tensorboard
Please note that we might also want to consider deleting the
flag entirely, since software like NGINX is capable of transparently rewriting URLs as part of the reverse proxying process.