forked from extern/egroupware
* Rocket.Chat: fix not working login with newer desktop clients
there were two problems: 1. Whatever URL you specify, the client removes the path and queries just /, our index.php now detects Rocket.Chat User-Agent header and redirects to /rocketchat/ in that case 2. our manifest.json an webworker registration was not using the individual webserver-URL but as static path
This commit is contained in:
parent
37be9f40d0
commit
910329c2e7
@ -77,7 +77,7 @@ egw_LAB.wait(function()
|
|||||||
|
|
||||||
// register service worker
|
// register service worker
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.register('./service-worker.js', {scope:"/egroupware/"})
|
navigator.serviceWorker.register('./service-worker.js', {scope:egw_webserverUrl})
|
||||||
.then(function(registration) {
|
.then(function(registration) {
|
||||||
console.log('Registration successful, scope is:', registration.scope);
|
console.log('Registration successful, scope is:', registration.scope);
|
||||||
})
|
})
|
||||||
|
@ -14,6 +14,14 @@ use EGroupware\Api;
|
|||||||
use EGroupware\Api\Framework;
|
use EGroupware\Api\Framework;
|
||||||
use EGroupware\Api\Egw;
|
use EGroupware\Api\Egw;
|
||||||
|
|
||||||
|
// Rocket.Chat desktop clients ignore /rocketchat/ path in URL and use just /
|
||||||
|
// --> redirect them back to /rocketchat/
|
||||||
|
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Rocket.Chat') !== false)
|
||||||
|
{
|
||||||
|
header('Location: /rocketchat/');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
// support of Mac or iPhone trying to autodetect CalDAV or CardDAV support
|
// support of Mac or iPhone trying to autodetect CalDAV or CardDAV support
|
||||||
// if EGroupware is not installed in the docroot, you need either this code in the index.php there,
|
// if EGroupware is not installed in the docroot, you need either this code in the index.php there,
|
||||||
// or an uncoditional redirect to this file or copy groupdav.htaccess to your docroot as .htaccess
|
// or an uncoditional redirect to this file or copy groupdav.htaccess to your docroot as .htaccess
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"start_url": "index.php",
|
"start_url": "index.php",
|
||||||
"background_color": "#fafafa",
|
"background_color": "#fafafa",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"scope": "/egroupware",
|
"scope": "/",
|
||||||
"theme_color": "#0073ae",
|
"theme_color": "#0073ae",
|
||||||
"serviceworker": {
|
"serviceworker": {
|
||||||
"src": "/service-worker.js"
|
"src": "/service-worker.js"
|
||||||
|
Loading…
Reference in New Issue
Block a user