Browse Source

Don't set self.RADICALE_SERVER_ALLOW_ORIGIN to * by default

Bastien Sevajol (Algoo) 8 years ago
parent
commit
1424718c5f
1 changed files with 10 additions and 1 deletions
  1. 10 1
      tracim/tracim/config/app_cfg.py

+ 10 - 1
tracim/tracim/config/app_cfg.py View File

@@ -256,8 +256,17 @@ class CFG(object):
256 256
         )
257 257
         self.RADICALE_SERVER_ALLOW_ORIGIN = tg.config.get(
258 258
             'radicale.server.allow_origin',
259
-            '*',
259
+            None,
260 260
         )
261
+        if not self.RADICALE_SERVER_ALLOW_ORIGIN:
262
+            self.RADICALE_SERVER_ALLOW_ORIGIN = self.WEBSITE_SERVER_NAME
263
+            logger.warning(
264
+                self,
265
+                'NOTE: Generated radicale.server.allow_origin parameter with '
266
+                'followings parameters: website.server_name ({0})'
267
+                .format(self.WEBSITE_SERVER_NAME)
268
+            )
269
+
261 270
         self.RADICALE_SERVER_REALM_MESSAGE = tg.config.get(
262 271
             'radicale.server.realm_message',
263 272
             'Tracim Calendar - Password Required',