diff options
author | Valery Piashchynski <[email protected]> | 2021-06-16 14:04:11 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-16 14:04:11 +0300 |
commit | 8483f605037317e9ac266f893d8ef80ff3a6a56e (patch) | |
tree | 98b5c6f5a6fd47b39306b5f30bbaa772b7f59893 /tests | |
parent | 9dc98d43b0c0de3e1e1bd8fdc97c122c7c7c594f (diff) |
- Add origin check for the websockets
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/worker-origin.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/worker-origin.php b/tests/worker-origin.php new file mode 100644 index 00000000..6ce4de59 --- /dev/null +++ b/tests/worker-origin.php @@ -0,0 +1,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' => ['*'] + ]); +} |