Skip to content

Commit

Permalink
Merge pull request #139 from philipmw/text-plain
Browse files Browse the repository at this point in the history
Fix content-type of error responses to text/plain
  • Loading branch information
yogthos committed May 4, 2024
2 parents 92a3090 + b45ecb5 commit fbb0c93
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
(ring/create-default-handler
{:not-found
(constantly (-> {:status 404, :body "Page not found"}
(http-response/content-type "text/html")))
(http-response/content-type "text/plain")))
:method-not-allowed
(constantly (-> {:status 405, :body "Not allowed"}
(http-response/content-type "text/html")))
(http-response/content-type "text/plain")))
:not-acceptable
(constantly (-> {:status 406, :body "Not acceptable"}
(http-response/content-type "text/html")))}))
(http-response/content-type "text/plain")))}))
{:middleware [(middleware/wrap-base opts)]}))

(defmethod ig/init-key :router/routes
Expand Down

0 comments on commit fbb0c93

Please sign in to comment.