* initial commit

This commit is contained in:
Dávid Danyi
2017-02-17 15:48:05 +01:00
commit ed29fb7f97
48 changed files with 6008 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Response;
use Zend\Diactoros\Response\JsonResponse;
class JsonCorsResponse extends JsonResponse
{
public function __construct($data,
$status = 200,
array $headers = [],
$encodingOptions = self::DEFAULT_JSON_FLAGS)
{
$headers['Access-Control-Allow-Origin'] = '*';
$headers['Access-Control-Allow-Methods'] = 'OPTIONS,GET,POST,PUT,PATCH,DELETE';
$headers['Access-Control-Allow-Headers'] = 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
parent::__construct($data, $status, $headers, $encodingOptions);
}
}