mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
Set Content-Type to json for /api/v3/* (fix #1056)
This commit is contained in:
@@ -30,6 +30,10 @@ abstract class ControllerBase extends ScalatraFilter
|
|||||||
|
|
||||||
implicit val jsonFormats = DefaultFormats
|
implicit val jsonFormats = DefaultFormats
|
||||||
|
|
||||||
|
before("/api/v3/*") {
|
||||||
|
contentType = formats("json")
|
||||||
|
}
|
||||||
|
|
||||||
// TODO Scala 2.11
|
// TODO Scala 2.11
|
||||||
// // Don't set content type via Accept header.
|
// // Don't set content type via Accept header.
|
||||||
// override def format(implicit request: HttpServletRequest) = ""
|
// override def format(implicit request: HttpServletRequest) = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user