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
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 1.15.6
|
||||
|
||||
- bug fixes
|
||||
- ios: prevent server error related to the use of cookies
|
||||
|
||||
## 1.15.5
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "open-stage-control",
|
||||
"productName": "Open Stage Control",
|
||||
"description": "Libre and modular OSC / MIDI controller",
|
||||
"version": "1.15.5",
|
||||
"version": "1.15.6",
|
||||
"author": {
|
||||
"name": "Jean-Emmanuel Doucet",
|
||||
"email": "jean-emmanuel@ammd.net"
|
||||
|
|
|
|||
|
|
@ -10,27 +10,37 @@ document.addEventListener('DOMContentLoaded', function(event) {
|
|||
var uiLoading = require('./ui/ui-loading')
|
||||
uiLoading(locales('loading_server'))
|
||||
|
||||
setTimeout(()=>{
|
||||
function init() {
|
||||
|
||||
var ipc = require('./ipc/'),
|
||||
backup = require('./backup')
|
||||
setTimeout(()=>{
|
||||
|
||||
ipc.init()
|
||||
var ipc = require('./ipc/'),
|
||||
backup = require('./backup')
|
||||
|
||||
ipc.init()
|
||||
|
||||
|
||||
require('./ui/init')
|
||||
require('./ui/init')
|
||||
|
||||
document.title = TITLE
|
||||
document.title = TITLE
|
||||
|
||||
ipc.send('open', {hotReload: backup.exists})
|
||||
ipc.send('open', {hotReload: backup.exists})
|
||||
|
||||
window.onunload = ()=>{
|
||||
ipc.send('close')
|
||||
}
|
||||
window.onunload = ()=>{
|
||||
ipc.send('close')
|
||||
}
|
||||
|
||||
backup.load()
|
||||
backup.load()
|
||||
|
||||
|
||||
}, 100)
|
||||
}, 100)
|
||||
|
||||
}
|
||||
|
||||
if (document.requestStorageAccess) {
|
||||
document.requestStorageAccess().then(init, init)
|
||||
} else {
|
||||
init()
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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