Skip to content

Commit

Permalink
#74 updating conditions for cors
Browse files Browse the repository at this point in the history
  • Loading branch information
tracend committed Mar 14, 2013
1 parent 2c27232 commit 1d92f39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/mvc.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ function cors() {

// Allow from any origin
if (isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header("Access-Control-Allow-Origin: $_SERVER['HTTP_ORIGIN']");
header('Access-Control-Allow-Credentials: true');
} else {
header("Access-Control-Allow-Origin: *");
}
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Headers: Content-Type, X-Requested-With, X-PINGOTHER');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE");
Expand Down

0 comments on commit 1d92f39

Please sign in to comment.