Quellcode durchsuchen

use website url_base scheme/protocol instead of http

Guénaël Muller vor 6 Jahren
Ursprung
Commit
bc1937ae61

+ 3 - 0
tracim/tracim/controllers/workspace.py Datei anzeigen

@@ -22,6 +22,7 @@ from tracim.model.data import Workspace
22 22
 
23 23
 from tracim.model.serializers import Context, CTX, DictLikeClass
24 24
 
25
+from urllib.parse import urlparse
25 26
 
26 27
 class UserWorkspaceRestController(TIMRestController):
27 28
 
@@ -101,11 +102,13 @@ class UserWorkspaceRestController(TIMRestController):
101 102
 
102 103
         dictified_workspace = Context(CTX.WORKSPACE).toDict(workspace, 'workspace')
103 104
         webdav_url = CFG.get_instance().WSGIDAV_CLIENT_BASE_URL
105
+        website_protocol = urlparse(CFG.get_instance().WEBSITE_BASE_URL).scheme
104 106
 
105 107
         return DictLikeClass(
106 108
             result=dictified_workspace,
107 109
             fake_api=fake_api,
108 110
             webdav_url=webdav_url,
111
+            website_protocol = website_protocol,
109 112
             show_deleted=show_deleted,
110 113
             show_archived=show_archived,
111 114
         )

+ 1 - 1
tracim/tracim/templates/workspace/getone.mak Datei anzeigen

@@ -129,7 +129,7 @@
129 129
             <div class="col-md-6">
130 130
                 <div class="input-group">
131 131
                     <span class="input-group-addon" style="width: 8em;"><i class="fa fa-fw fa-windows"></i> Windows</span>
132
-                    <div class="form-control webdavconfig__input">http://${webdav_url}</div>
132
+                    <div class="form-control webdavconfig__input">${website_protocol}://${webdav_url}</div>
133 133
                 </div>
134 134
                 <p></p>
135 135
                 <div class="input-group">