summaryrefslogtreecommitdiff
path: root/tests/worker-cors.php
blob: ea3c986c2b2180801db0a4395d5568a7276f95b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

use Spiral\RoadRunner\Worker;
use Spiral\RoadRunner\Http\HttpWorker;

ini_set('display_errors', 'stderr');
require __DIR__ . '/vendor/autoload.php';

$http = new HttpWorker(Worker::create());

while ($req = $http->waitRequest()) {
    $http->respond(200, 'Response', [
        'Access-Control-Allow-Origin' => ['*']
    ]);
}