Add a new config graphqlWebsocketUrl in bbb-web.properties (#19433)
This commit is contained in:
parent
0dac0c267b
commit
5779bc0410
@ -70,6 +70,8 @@ public class ParamsProcessorUtil {
|
||||
private String defaultServerUrl;
|
||||
private int defaultNumDigitsForTelVoice;
|
||||
private String defaultHTML5ClientUrl;
|
||||
|
||||
private String graphqlWebsocketUrl;
|
||||
private String defaultGuestWaitURL;
|
||||
private Boolean allowRequestsWithoutSession = false;
|
||||
private Integer defaultHttpSessionTimeout = 14400;
|
||||
@ -864,6 +866,10 @@ public class ParamsProcessorUtil {
|
||||
return defaultHTML5ClientUrl;
|
||||
}
|
||||
|
||||
public String getGraphqlWebsocketUrl() {
|
||||
return graphqlWebsocketUrl;
|
||||
}
|
||||
|
||||
public String getDefaultGuestWaitURL() {
|
||||
return defaultGuestWaitURL;
|
||||
}
|
||||
@ -1217,6 +1223,10 @@ public class ParamsProcessorUtil {
|
||||
this.defaultHTML5ClientUrl = defaultHTML5ClientUrl;
|
||||
}
|
||||
|
||||
public void setGraphqlWebsocketUrl(String graphqlWebsocketUrl) {
|
||||
this.graphqlWebsocketUrl = graphqlWebsocketUrl.replace("https://","wss://");
|
||||
}
|
||||
|
||||
public void setDefaultGuestWaitURL(String url) {
|
||||
this.defaultGuestWaitURL = url;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class ResponseBuilder {
|
||||
return new Date(timestamp).toString();
|
||||
}
|
||||
|
||||
public String buildMeetingVersion(String apiVersion, String bbbVersion, String returnCode) {
|
||||
public String buildMeetingVersion(String apiVersion, String bbbVersion, String graphqlWebsocketUrl, String returnCode) {
|
||||
StringWriter xmlText = new StringWriter();
|
||||
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
@ -60,6 +60,7 @@ public class ResponseBuilder {
|
||||
data.put("version", apiVersion);
|
||||
data.put("apiVersion", apiVersion);
|
||||
data.put("bbbVersion", bbbVersion);
|
||||
data.put("graphqlWebsocketUrl", graphqlWebsocketUrl);
|
||||
|
||||
processData(getTemplate("api-version.ftlx"), data, xmlText);
|
||||
|
||||
|
@ -286,7 +286,7 @@ waitingGuestUsersTimeout=30000
|
||||
enteredUsersTimeout=45000
|
||||
|
||||
#----------------------------------------------------
|
||||
# This URL is where the BBB client is accessible. When a user sucessfully
|
||||
# This URL is where the BBB client is accessible. When a user successfully
|
||||
# enters a name and password, she is redirected here to load the client.
|
||||
# Do not commit changes to this field.
|
||||
bigbluebutton.web.serverURL=http://bigbluebutton.example.com
|
||||
@ -300,6 +300,10 @@ bigbluebutton.web.logoutURL=default
|
||||
# successfully joining the meeting.
|
||||
defaultHTML5ClientUrl=${bigbluebutton.web.serverURL}/html5client/join
|
||||
|
||||
# Graphql websocket url (it's necessary to change for cluster setup)
|
||||
# Using `serverURL` as default, so `https` will be automatically replaced by `wss`
|
||||
graphqlWebsocketUrl=${bigbluebutton.web.serverURL}/v1/graphql
|
||||
|
||||
useDefaultLogo=false
|
||||
defaultLogoURL=${bigbluebutton.web.serverURL}/images/logo.png
|
||||
|
||||
|
@ -145,6 +145,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<property name="defaultServerUrl" value="${bigbluebutton.web.serverURL}"/>
|
||||
<property name="defaultNumDigitsForTelVoice" value="${defaultNumDigitsForTelVoice}"/>
|
||||
<property name="defaultHTML5ClientUrl" value="${defaultHTML5ClientUrl}"/>
|
||||
<property name="graphqlWebsocketUrl" value="${graphqlWebsocketUrl}"/>
|
||||
<property name="useDefaultLogo" value="${useDefaultLogo}"/>
|
||||
<property name="defaultLogoURL" value="${defaultLogoURL}"/>
|
||||
<property name="defaultGuestWaitURL" value="${defaultGuestWaitURL}"/>
|
||||
|
@ -85,9 +85,32 @@ class ApiController {
|
||||
log.debug CONTROLLER_NAME + "#index"
|
||||
response.addHeader("Cache-Control", "no-cache")
|
||||
|
||||
withFormat {
|
||||
xml {
|
||||
render(text: responseBuilder.buildMeetingVersion(paramsProcessorUtil.getApiVersion(), paramsProcessorUtil.getBbbVersion(), RESP_CODE_SUCCESS), contentType: "text/xml")
|
||||
def contentType = request.getHeader("content-type")
|
||||
|
||||
if(contentType == 'application/json') {
|
||||
withFormat {
|
||||
json {
|
||||
def builder = new JsonBuilder()
|
||||
builder.response {
|
||||
returncode RESP_CODE_SUCCESS
|
||||
version paramsProcessorUtil.getApiVersion()
|
||||
apiVersion paramsProcessorUtil.getApiVersion()
|
||||
bbbVersion paramsProcessorUtil.getBbbVersion()
|
||||
graphqlWebsocketUrl paramsProcessorUtil.getGraphqlWebsocketUrl()
|
||||
}
|
||||
render(contentType: "application/json", text: builder.toPrettyString())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
withFormat {
|
||||
xml {
|
||||
render(text: responseBuilder.buildMeetingVersion(
|
||||
paramsProcessorUtil.getApiVersion(),
|
||||
paramsProcessorUtil.getBbbVersion(),
|
||||
paramsProcessorUtil.getGraphqlWebsocketUrl(),
|
||||
RESP_CODE_SUCCESS),
|
||||
contentType: "text/xml")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,5 +6,6 @@
|
||||
<version>${apiVersion}</version>
|
||||
<apiVersion>${apiVersion}</apiVersion>
|
||||
<bbbVersion>${bbbVersion}</bbbVersion>
|
||||
<graphqlWebsocketUrl>${graphqlWebsocketUrl}</graphqlWebsocketUrl>
|
||||
</response>
|
||||
</#compress>
|
||||
|
@ -98,6 +98,7 @@ defaultHTML5ClientUrl=https://bbb-proxy.example.com/bbb-01/html5client/join
|
||||
presentationBaseURL=https://bbb-01.example.com/bigbluebutton/presentation
|
||||
accessControlAllowOrigin=https://bbb-proxy.example.com
|
||||
defaultGuestWaitURL=https://bbb-01.example.com/bbb-01/html5client/guestWait
|
||||
graphqlWebsocketUrl=wss://bbb-01.example.com/v1/graphql
|
||||
```
|
||||
|
||||
Add the following options to `/etc/bigbluebutton/bbb-html5.yml`:
|
||||
@ -108,7 +109,6 @@ public:
|
||||
basename: '/bbb-01/html5client'
|
||||
bbbWebBase: 'https://bbb-01.example.com/bigbluebutton'
|
||||
learningDashboardBase: 'https://bbb-01.example.com/learning-dashboard'
|
||||
graphqlUrl: wss://bbb-01.example.com/v1/graphql
|
||||
media:
|
||||
stunTurnServersFetchAddress: 'https://bbb-01.example.com/bigbluebutton/api/stuns'
|
||||
sip_ws_host: 'bbb-01.example.com'
|
||||
|
Loading…
Reference in New Issue
Block a user