Brutal CORS config
This commit is contained in:
parent
8751db7452
commit
444955337d
@ -1,7 +1,7 @@
|
|||||||
nelmio_cors:
|
nelmio_cors:
|
||||||
defaults:
|
defaults:
|
||||||
origin_regex: true
|
origin_regex: true
|
||||||
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
|
allow_origin: ['*']
|
||||||
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
|
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
|
||||||
allow_headers: ['Content-Type', 'Authorization']
|
allow_headers: ['Content-Type', 'Authorization']
|
||||||
expose_headers: ['Link']
|
expose_headers: ['Link']
|
||||||
|
@ -15,7 +15,7 @@ class NotConservedController extends AbstractController
|
|||||||
public function index(EntityManagerInterface $em): JsonResponse
|
public function index(EntityManagerInterface $em): JsonResponse
|
||||||
{
|
{
|
||||||
$repo = $em->getRepository(NotConserved::class);
|
$repo = $em->getRepository(NotConserved::class);
|
||||||
$repoBib = $em->getRepository(Bibliography::class);
|
//$repoBib = $em->getRepository(Bibliography::class);
|
||||||
|
|
||||||
$records = $repo->findBy([], ['id' => 'ASC']);
|
$records = $repo->findBy([], ['id' => 'ASC']);
|
||||||
|
|
||||||
@ -24,8 +24,8 @@ class NotConservedController extends AbstractController
|
|||||||
$id = $record->getId();
|
$id = $record->getId();
|
||||||
$record->setLat($repo->coordinates($id)['lat']);
|
$record->setLat($repo->coordinates($id)['lat']);
|
||||||
$record->setLng($repo->coordinates($id)['lng']);
|
$record->setLng($repo->coordinates($id)['lng']);
|
||||||
$biblio = $repoBib->findAllByNotConserved($id);
|
//$biblio = $repoBib->findAllByNotConserved($id);
|
||||||
$record->setBibliographies($biblio);
|
//$record->setBibliographies($biblio);
|
||||||
$records[$key] = $record;
|
$records[$key] = $record;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user