feat: expose public legal agreement pages
This commit is contained in:
+7
-2
@@ -851,6 +851,7 @@ func serveIMTenantEntryFeedback(wrt http.ResponseWriter, req *http.Request) {
|
||||
|
||||
func imPublicEndpoints(req *http.Request) map[string]any {
|
||||
base := imPublicHTTPBase(req)
|
||||
httpBase := strings.TrimRight(base, "/")
|
||||
wsBase := base
|
||||
if strings.HasPrefix(wsBase, "https://") {
|
||||
wsBase = "wss://" + strings.TrimPrefix(wsBase, "https://")
|
||||
@@ -863,8 +864,12 @@ func imPublicEndpoints(req *http.Request) map[string]any {
|
||||
}
|
||||
return map[string]any{
|
||||
"websocket": wsEndpoint,
|
||||
"api": strings.TrimRight(base, "/") + "/v1/im",
|
||||
"file": strings.TrimRight(base, "/") + "/v0/file",
|
||||
"api": httpBase + "/v1/im",
|
||||
"file": httpBase + "/v0/file",
|
||||
"legal": map[string]any{
|
||||
"user_terms": httpBase + "/legal/user-terms",
|
||||
"privacy_policy": httpBase + "/legal/privacy-policy",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user