ios: attempt to fix cookie related issue
server: fail-safe in case client id is not found in http cookies
This commit is contained in:
parent
85b7b43928
commit
a60c1423a7
4 changed files with 40 additions and 13 deletions
|
|
@ -45,6 +45,18 @@ resolveDirs.push(settings.read('remote-root') || '') // remote-root / absolute
|
|||
|
||||
function resolvePath(url, clientId) {
|
||||
|
||||
if (clientId === undefined) {
|
||||
// safari seems to be picky with cookies
|
||||
console.error(`(ERROR, HTTP) Could not resolve requested url ${url} (client id not found in http cookies)`)
|
||||
return false
|
||||
}
|
||||
|
||||
if (!ipc.clients[clientId]) {
|
||||
// this should never happen, but just in case...
|
||||
console.error(`(ERROR, HTTP) Could not resolve requested url ${url} (unregistered client id ${clientId})`)
|
||||
return false
|
||||
}
|
||||
|
||||
var sessionPath = path.dirname(ipc.clients[clientId].sessionPath)
|
||||
|
||||
url = resolveHomeDir(url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue