From dce4f436f77b71155483a47a6ad14da5c0ae5d6a Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 18 May 2020 10:56:43 +0100 Subject: Add -api flag to monolith (#1044) * Add flag for enabling HTTP APIs in monolith mode * Flag -api * Only start HTTP APIs if needed --- roomserver/roomserver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'roomserver/roomserver.go') diff --git a/roomserver/roomserver.go b/roomserver/roomserver.go index 450da5bb..aa5d223e 100644 --- a/roomserver/roomserver.go +++ b/roomserver/roomserver.go @@ -51,7 +51,9 @@ func SetupRoomServerComponent( KeyRing: keyRing, } - internalAPI.SetupHTTP(http.DefaultServeMux) + if base.EnableHTTPAPIs { + internalAPI.SetupHTTP(http.DefaultServeMux) + } return &internalAPI } -- cgit v1.2.3