Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions jsonAPI/JsonApiMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class JsonApiMiddleware extends \Slim\Middleware {
function __construct(){

$app = \Slim\Slim::getInstance();
$app->config('debug', false);

// Mirrors the API request
$app->get('/return', function() use ($app) {
Expand Down Expand Up @@ -63,9 +62,10 @@ function __construct(){

// Handle Empty response body
$app->hook('slim.after.router', function () use ($app) {
//Fix sugested by: https://github.com/bdpsoft
//Will allow download request to flow
if($app->response()->header('Content-Type')==='application/octet-stream'){

// don't render an empty response warning
// if we have specified another content-type
if($app->response()->header('Content-Type')!=='application/json'){
return;
}

Expand Down