Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A simple shuttering of the service by adding a router we can configure in place of the prod router.
We configure the router with the configuration item
play.http.router
. In production this isprod.Routes
and in other environments it istestOnlyDoNotUseInAppConf.Routes
. In this branch it has been changed inbuild.sbt
toshutter.Routes
. See line 37. You can change it back to testOnlyDoNotUseInAppConf.Routes and the service will work as normal.You can test this using
sbt run
and visiting the service locally on port 9000.The shutter router basically routes every request on
/api-hub
to some static content that states the service is down for maintenance. It is actually both a router and a controller.We still want to serve up health and metrics endpoints while shuttered.