diff --git a/config b/config index b9df376..9c7b8a9 100644 --- a/config +++ b/config @@ -34,6 +34,8 @@ ciphers = dns_lookup = True # Root URL of Radicale (starting and ending with a slash) base_prefix = / +# Possibility to allow URLs cleaned by a HTTP server, without the base_prefix +can_skip_base_prefix = False # Message displayed in the client when a password is needed realm = Radicale - Password Required diff --git a/radicale/__init__.py b/radicale/__init__.py index 8451e43..376973a 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -252,6 +252,9 @@ class Application(object): environ["PATH_INFO"] = self.sanitize_uri( "/%s" % environ["PATH_INFO"][len(base_prefix):]) log.LOGGER.debug("Sanitized path: %s", environ["PATH_INFO"]) + elif config.get("server", "can_skip_base_prefix"): + log.LOGGER.debug( + "Skipped already sanitized path: %s", environ["PATH_INFO"]) else: # Request path not starting with base_prefix, not allowed log.LOGGER.debug( diff --git a/radicale/config.py b/radicale/config.py index f6ac6f0..3ba983e 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -49,6 +49,7 @@ INITIAL_CONFIG = { "ciphers": "", "dns_lookup": "True", "base_prefix": "/", + "can_skip_base_prefix": "False", "realm": "Radicale - Password Required"}, "encoding": { "request": "utf-8",