|
@@ -286,22 +286,28 @@ class CFG(object):
|
286
|
286
|
'Tracim Calendar - Password Required',
|
287
|
287
|
)
|
288
|
288
|
|
289
|
|
- self.RADICALE_CLIENT_BASE_URL_TEMPLATE = \
|
290
|
|
- tg.config.get('radicale.client.base_url', None)
|
|
289
|
+ self.RADICALE_CLIENT_BASE_URL_HOST = \
|
|
290
|
+ tg.config.get('radicale.client.base_url.host', None)
|
291
|
291
|
|
292
|
|
- if not self.RADICALE_CLIENT_BASE_URL_TEMPLATE:
|
293
|
|
- self.RADICALE_CLIENT_BASE_URL_TEMPLATE = \
|
294
|
|
- 'http://{0}:{1}'.format(
|
295
|
|
- self.WEBSITE_SERVER_NAME,
|
296
|
|
- self.RADICALE_SERVER_PORT,
|
297
|
|
- )
|
|
292
|
+ self.RADICALE_CLIENT_BASE_URL_PREFIX = \
|
|
293
|
+ tg.config.get('radicale.client.base_url.prefix', '/')
|
|
294
|
+ # Ensure finished by '/'
|
|
295
|
+ if '/' != self.RADICALE_CLIENT_BASE_URL_PREFIX[-1]:
|
|
296
|
+ self.RADICALE_CLIENT_BASE_URL_PREFIX += '/'
|
|
297
|
+
|
|
298
|
+ if not self.RADICALE_CLIENT_BASE_URL_HOST:
|
298
|
299
|
logger.warning(
|
299
|
300
|
self,
|
300
|
|
- 'NOTE: Generated radicale.client.base_url parameter with '
|
301
|
|
- 'followings parameters: website.server_name, '
|
302
|
|
- 'radicale.server.port -> {0}'
|
303
|
|
- .format(self.RADICALE_CLIENT_BASE_URL_TEMPLATE)
|
|
301
|
+ 'Generated radicale.client.base_url.host parameter with '
|
|
302
|
+ 'followings parameters: website.server_name -> {}'
|
|
303
|
+ .format(self.RADICALE_CLIENT_BASE_URL_HOST)
|
304
|
304
|
)
|
|
305
|
+ self.RADICALE_CLIENT_BASE_URL_HOST = self.RADICALE_SERVER_PORT
|
|
306
|
+
|
|
307
|
+ self.RADICALE_CLIENT_BASE_URL_TEMPLATE = '{}{}'.format(
|
|
308
|
+ self.RADICALE_CLIENT_BASE_URL_HOST,
|
|
309
|
+ self.RADICALE_CLIENT_BASE_URL_PREFIX,
|
|
310
|
+ )
|
305
|
311
|
|
306
|
312
|
self.USER_AUTH_TOKEN_VALIDITY = int(tg.config.get(
|
307
|
313
|
'user.auth_token.validity',
|