Skip to content

Commit

Permalink
enable cross-origin resource sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
LaercioSantana committed Sep 30, 2016
1 parent 59a69b4 commit b2c325a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Token");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
$method = $_SERVER['REQUEST_METHOD'];
if($method == "OPTIONS") {
die();
}
/**
* CodeIgniter
*
Expand Down

0 comments on commit b2c325a

Please sign in to comment.