server: add font extension to whitelist

This commit is contained in:
jean-emmanuel 2019-07-06 11:09:19 +02:00
parent 8c2f86531d
commit 30d7ffb091
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 0.47.1
- bug fixes
- css font faces not loading from absolute/relative paths
## 0.47.0
- bug fixes

View file

@ -48,7 +48,7 @@ function httpRoute(req, res) {
url = url.replace('_:_', ':') // escaped drive colon
url = url.replace(/^\/([^/]*:)/, '$1') // strip leading slash
if (url.match(/.(jpg|jpeg|png|apng|gif|webp|tiff|xbm|bmp|ico)(\?[0-9]*)?$/i)) {
if (url.match(/.(jpg|jpeg|png|apng|gif|webp|tiff|xbm|bmp|ico|ttf|otf|woff|woff2)(\?[0-9]*)?$/i)) {
try {
// relative resolution (session path)
var id = urlparser.parse('?' + req.headers.cookie, true).query.client_id,