- return the following response when api service is unavailable.

<response>
  <returncode>503</returncode>
  <reason>API Service Unavailable</reason>
</response>
This commit is contained in:
Richard Alam 2017-08-08 13:50:08 -07:00
parent 1a698058e1
commit fae9dfdf14
2 changed files with 12 additions and 8 deletions

View File

@ -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
}
}
}
}
}

View File

@ -0,0 +1,4 @@
<response>
<returncode>503</returncode>
<reason>API Service Unavailable</reason>
</response>