From 02c3e71dd95243418b98ed1121a65364edb0f77c Mon Sep 17 00:00:00 2001 From: everyx Date: Fri, 4 Nov 2016 19:06:51 +0800 Subject: [PATCH] set Access-Control-Allow-Origin --- src/Controller/OperatorStatusController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Controller/OperatorStatusController.php b/src/Controller/OperatorStatusController.php index de7a4b3..c430dfb 100644 --- a/src/Controller/OperatorStatusController.php +++ b/src/Controller/OperatorStatusController.php @@ -51,6 +51,8 @@ class OperatorStatusController extends AbstractController $is_online = "true"; } } - return new Response($is_online); + $response = new Response($is_online); + $response->headers->set('Access-Control-Allow-Origin', '*'); + return $response; } }