client options specified in server config not working unless lowercased

This commit is contained in:
jean-emmanuel 2021-11-05 16:50:49 +01:00
parent 3a66388335
commit bcf8954d9c
2 changed files with 9 additions and 1 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 1.11.1
- bug fixes
- client options specified in server config not working unless lowercased
## 1.11.0
- bug fixes

View file

@ -1,8 +1,11 @@
window.IP = window.IP || ''
window.ENV = window.ENV || {}
location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi, (s,k,v)=>{
ENV[k.toLowerCase()]=v
ENV[k]=v
})
for (var k in ENV) {
ENV[k.toLowerCase()] = ENV[k]
}
window.LANG = ENV.lang === 'debug' ? 'debug' : (ENV.lang || navigator.language || '').substr(0, 2).toLowerCase()