src/Controller/Website/TempController.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Website;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\JsonResponse;
  5. use Symfony\Component\HttpFoundation\Request;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. class TempController extends AbstractController
  8. {
  9.     #[Route('/'name'temp_home')]
  10.     public function index(Request $request)
  11.     {
  12.         $incomeUrl $request->getHttpHost();
  13.         $mainUrls = [
  14.             'tehrannet.org',
  15.             'tehrannetvpn.com',
  16.             'beta.tehrannet.org',
  17.         ];
  18.         if (true) {
  19. //        if (!in_array($incomeUrl, $mainUrls)) {
  20.             return  $this->redirectToRoute('app_login');
  21.         }
  22.         return  $this->render('website/index.html.twig');
  23.     }
  24. }