3 namespace Drupal\eu_cookie_compliance\Controller;
5 use Drupal\Core\Controller\ControllerBase;
6 use Symfony\Component\HttpFoundation\JsonResponse;
9 * Controller for JS call that checks if the visitor is in the EU.
11 class CheckIfEuCountryJsController extends ControllerBase {
16 public function content() {
17 $data = eu_cookie_compliance_user_in_eu();
18 return new JsonResponse($data, 200, ['Cache-Control' => 'private']);