Skip to content

Commit

Permalink
Add application/json content type to all responses
Browse files Browse the repository at this point in the history
  • Loading branch information
thehowl committed Mar 4, 2018
1 parent e3807a4 commit 6ddfddb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions router.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

$method_path = realpath(__DIR__ . "/methods" . $request_uri . ".php");

header("Content-Type: application/json; charset=utf-8");

// make sure the path is valid
if (strpos($method_path, __DIR__ . "/methods/") === FALSE) {
error_message("not found", 404);
Expand Down

0 comments on commit 6ddfddb

Please sign in to comment.