summaryrefslogtreecommitdiff
path: root/tests/worker-cors.php
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-08-12 15:38:19 +0300
committerGitHub <[email protected]>2021-08-12 15:38:19 +0300
commitdf27287c78d7b17d7c8f0e7fff59fa7cbf2a4f9f (patch)
treedf0749155487eae6bcdbb2456885131a21916f4d /tests/worker-cors.php
parent67db4b5f7b66e9a32713133baed83c3ab7146bb8 (diff)
parentecbfc5c5265a9895f4e371ce4388f64df8714e63 (diff)
#726: feat(plugin): new `jobs` plugin
#726: feat(plugin): new `jobs` plugin
Diffstat (limited to 'tests/worker-cors.php')
-rw-r--r--tests/worker-cors.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/worker-cors.php b/tests/worker-cors.php
new file mode 100644
index 00000000..ea3c986c
--- /dev/null
+++ b/tests/worker-cors.php
@@ -0,0 +1,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' => ['*']
+ ]);
+}