From fae9dfdf147305f401cb5c4d20327ab64aa44212 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Tue, 8 Aug 2017 13:50:08 -0700 Subject: [PATCH] - return the following response when api service is unavailable. 503 API Service Unavailable --- .../grails-app/conf/BigBlueButtonFilters.groovy | 16 ++++++++-------- bigbluebutton-web/grails-app/views/api/error.gsp | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100755 bigbluebutton-web/grails-app/views/api/error.gsp diff --git a/bigbluebutton-web/grails-app/conf/BigBlueButtonFilters.groovy b/bigbluebutton-web/grails-app/conf/BigBlueButtonFilters.groovy index 50788b1684..d21e9b3b05 100755 --- a/bigbluebutton-web/grails-app/conf/BigBlueButtonFilters.groovy +++ b/bigbluebutton-web/grails-app/conf/BigBlueButtonFilters.groovy @@ -27,13 +27,13 @@ class BigBlueButtonFilters { response.setHeader("Access-Control-Allow-Origin", "${grailsApplication.config.accessControlAllowOrigin}") } } -// serviceUnavailable(controller:'api',action:'(create|join|isMeetingRunning|end|getMeetingInfo|getMeetings|enter|signOut)') { -// before = { -// if (keepAliveService.isDown()) { -// response.sendError(503, "BigBlueButton") -// return false -// } -// } -// } + serviceUnavailable(controller:'api',action:'(create|join|isMeetingRunning|end|getMeetingInfo|getMeetings|enter|signOut)') { + before = { + if (keepAliveService.isDown()) { + render(view: "error") + return false + } + } + } } } \ No newline at end of file diff --git a/bigbluebutton-web/grails-app/views/api/error.gsp b/bigbluebutton-web/grails-app/views/api/error.gsp new file mode 100755 index 0000000000..ae4da8f698 --- /dev/null +++ b/bigbluebutton-web/grails-app/views/api/error.gsp @@ -0,0 +1,4 @@ + + 503 + API Service Unavailable +