Brutal CORS config

This commit is contained in:
Nicolò P 2024-11-20 17:33:48 +01:00
parent 8751db7452
commit 444955337d
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
nelmio_cors:
defaults:
origin_regex: true
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
allow_origin: ['*']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['Content-Type', 'Authorization']
expose_headers: ['Link']

View File

@ -15,7 +15,7 @@ class NotConservedController extends AbstractController
public function index(EntityManagerInterface $em): JsonResponse
{
$repo = $em->getRepository(NotConserved::class);
$repoBib = $em->getRepository(Bibliography::class);
//$repoBib = $em->getRepository(Bibliography::class);
$records = $repo->findBy([], ['id' => 'ASC']);
@ -24,8 +24,8 @@ class NotConservedController extends AbstractController
$id = $record->getId();
$record->setLat($repo->coordinates($id)['lat']);
$record->setLng($repo->coordinates($id)['lng']);
$biblio = $repoBib->findAllByNotConserved($id);
$record->setBibliographies($biblio);
//$biblio = $repoBib->findAllByNotConserved($id);
//$record->setBibliographies($biblio);
$records[$key] = $record;
}