<?php
/**
 * Created by PhpStorm.
 * User: Joseg
 * Date: 22/5/2018
 * Time: 3:26 AM
 */

http_response_code(201);
header('Allow: GET, POST');
header("Access-Control-Allow-Headers: Authorization, Content-Type");
header("Access-Control-Allow-Origin: *");
header('content-type: application/json; charset=utf-8');
if (isset($_SERVER['HTTP_ORIGIN'])) {
    header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"
        ,'Access-Control-Allow-Credentials: true');
}$data = array("message" => "Denegado");
echo json_encode($data);