<?php
namespace App\Controller\Website;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
class TempController extends AbstractController
{
#[Route('/', name: 'temp_home')]
public function index(Request $request)
{
$incomeUrl = $request->getHttpHost();
$mainUrls = [
'tehrannet.org',
'tehrannetvpn.com',
'beta.tehrannet.org',
];
if (true) {
// if (!in_array($incomeUrl, $mainUrls)) {
return $this->redirectToRoute('app_login');
}
return $this->render('website/index.html.twig');
}
}