Skip to content

Commit e9c9fc9

Browse files
authored
Merge pull request #86 from gdarquie/MC-78
Correction for CORS
2 parents de94bdf + 2684802 commit e9c9fc9

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

config/packages/nelmio_cors.yaml

+15-9
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@ nelmio_cors:
33
origin_regex: true
44
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
55
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
6-
allow_headers: ['Content-Type', 'Authorization']
6+
# allow_headers: ['Content-Type', 'Authorization']
7+
allow_headers: ['*']
78
expose_headers: ['Link']
89
max_age: 3600
910
paths:
1011
'^/api/':
1112
allow_origin: ['*']
1213
max_age: 3600
13-
'^/api/import':
14-
allow_origin: ['%env(string:ADMIN_CORS_ALLOW_ORIGIN)%']
15-
allow_methods: ['POST', 'PUT', 'GET']
14+
# '^/api/import':
15+
# allow_origin: ['%env(string:ADMIN_CORS_ALLOW_ORIGIN)%']
16+
# allow_methods: ['POST', 'PUT', 'GET']
17+
# max_age: 3600
18+
# '^/api/indexation':
19+
# allow_origin: ['%env(string:ADMIN_CORS_ALLOW_ORIGIN)%']
20+
# allow_methods: ['POST', 'PUT', 'GET']
21+
# max_age: 3600
22+
'^/authentication_token':
23+
origin_regex: true
24+
allow_origin: ['%env(ADMIN_CORS_ALLOW_ORIGIN)%']
25+
allow_headers: [ '*' ]
26+
allow_methods: ['POST']
1627
max_age: 3600
17-
'^/api/indexation':
18-
allow_origin: ['%env(string:ADMIN_CORS_ALLOW_ORIGIN)%']
19-
allow_methods: ['POST', 'PUT', 'GET']
20-
max_age: 3600
21-
'^/': null

src/Component/Importer/ImporterVoter.php

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22

3-
43
namespace App\Component\Importer;
54

6-
75
use App\Component\Error\Mc3Error;
86
use App\Entity\Heredity\AbstractImportable;
97
use App\Entity\Import;

0 commit comments

Comments
 (0)