Commit 3ffa125d authored by thiaramus's avatar thiaramus
Browse files

Added workaround for Cross Origin Resource Sharing to support Cross-Domain Ajax Requests

parent 24ff0623
......@@ -54,6 +54,9 @@
* @param $response
*/
protected function response($response) {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, PATCH, OPTIONS');
header('Access-Control-Max-Age: 1000');
header('Content-Type: application/json');
echo json_encode($response, JSON_PRETTY_PRINT);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment