1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-07 18:30:54 +00:00

Redirect GET and HEAD requests to sanitized path

This commit is contained in:
Unrud 2022-01-15 22:32:37 +01:00
parent 6dee974b74
commit b93842b10c
4 changed files with 29 additions and 17 deletions

View file

@ -28,7 +28,7 @@ const SERVER = location.origin;
* @const
* @type {string}
*/
const ROOT_PATH = location.pathname.replace(new RegExp("/+[^/]+/*(/index\\.html?)?$"), "") + '/';
const ROOT_PATH = (new URL("..", location.href)).pathname;
/**
* Regex to match and normalize color