server: fix cookie parsing (user resources not loading when using an external browser)

This commit is contained in:
jean-emmanuel 2024-04-03 08:47:19 +02:00
parent ededaee55b
commit 20d5091622
2 changed files with 12 additions and 3 deletions

View file

@ -1,9 +1,15 @@
# Changelog
## 1.26.2
- bug fixes
- user resources not loading when using an external browser
- advanced syntaxes resolution order issue
## 1.26.1
- bug fixes
- mac: unable to show launcher windows when starting minimized
- mac: unable to show launcher windows when starting minimized
## 1.26.0

View file

@ -158,9 +158,12 @@ function httpRoute(req, res) {
if (url.match(/.(svg|jpg|jpeg|png|apng|gif|webp|tiff|xbm|bmp|ico|ttf|otf|woff|woff2|html|css|js)(\?[0-9]*)?$/i)) {
// Resolution order: session path, theme path, absolute path
var id
if (req.headers.cookie) {
id = (req.headers.cookie.match(/client_id=([^;]+)/) || [])[1]
}
var id = urlparser.parse('?' + req.headers.cookie, true).query.client_id,
resolvedPath = resolvePath(decodeURI(url), id)
resolvedPath = resolvePath(decodeURI(url), id)
if (resolvedPath) {
try {