chore: Allow websockets and collaboration service to run in the same process (#2674)

This commit is contained in:
Tom Moor
2021-10-19 21:18:20 -07:00
committed by GitHub
parent 3610a7f4a2
commit d443abfc57
11 changed files with 67 additions and 76 deletions

View File

@@ -6,7 +6,7 @@ export default function present(env: Object): Object {
return {
URL: env.URL.replace(/\/$/, ""),
CDN_URL: (env.CDN_URL || "").replace(/\/$/, ""),
COLLABORATION_URL: (env.COLLABORATION_URL || "")
COLLABORATION_URL: (env.COLLABORATION_URL || env.URL)
.replace(/\/$/, "")
.replace(/^http/, "ws"),
DEPLOYMENT: env.DEPLOYMENT,

View File

@@ -1,5 +1,4 @@
// @flow
import env from "../env";
import { Team } from "../models";
export default function present(team: Team) {
@@ -8,9 +7,7 @@ export default function present(team: Team) {
name: team.name,
avatarUrl: team.logoUrl,
sharing: team.sharing,
collaborativeEditing: !!(
team.collaborativeEditing && env.COLLABORATION_URL
),
collaborativeEditing: team.collaborativeEditing,
documentEmbeds: team.documentEmbeds,
guestSignin: team.guestSignin,
subdomain: team.subdomain,