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

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

require __DIR__ . '/vendor/autoload.php';

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

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