title: SYMFONY NELMIO CORS issue : Access-Control-Allow-Origin header contains multiple values
body: <p>I created an API with symfony, FOSRestBundle and NelmioCorsBundle and I connect to it with a Ionic APP. some routes return me a CORS error :</p>
  <p>Access to XMLHttpRequest at 'http://dev.myapp.com/api/login_check' fromfrom localhost/:1 origin 'http://localhost:8100' has been blocked by CORS policy: Response to the preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost/8100, *', but only one is allowed.</p>
  <p>there is some part of my code :</p>
  <p>config/nelmio_cors.yml :</p>
  <pre><code>nelmio_cors:
     defaults:
         allow_credentials: false
         allow_origin: []
         allow_headers: []
         allow_methods: []
         expose_headers: []
         max_age: 0
         hosts: []
         origin_regex: false
     paths:
         '^/api':
             allow_origin: ['*']
             allow_headers: ['*']
             allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
             max_age: 3600
  
  </code></pre>
  <p>I tried to add this in the .htaccess but without success:</p>
  <pre><code>   Header always set Access-Control-Allow-Origin: &quot;*&quot;
     Header always set Access-Control-Allow-Methods: &quot;GET,POST,OPTIONS,DELETE,PUT&quot;
  </code></pre>
  <p>Someone have an idea about this problem ? thanks you</p>