Skip to content

Commit

Permalink
Explicitly declare the UTF-8 charset for json responses (#1231)
Browse files Browse the repository at this point in the history
* crystal 0.28.0 compatibility

* Add UTF-8 charset to json Content-Type response header

---------

Co-authored-by: Aaron Namba <aaron@aaronnamba.com>
  • Loading branch information
damianham and anamba committed Jun 15, 2023
1 parent 8f60747 commit 382289f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/amber/controller/helpers/responders.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Amber::Controller::Helpers
class Content
TYPE = {
html: "text/html",
json: "application/json",
json: "application/json; charset=utf-8",
txt: "text/plain",
text: "text/plain",
xml: "application/xml",
Expand Down

0 comments on commit 382289f

Please sign in to comment.