jdesrosiers / silex-cors-provider

A silex service provider that adds CORS services to silex
MIT License
78 stars 25 forks source link

Duplicate Access-Control-Allow-Origin #13

Closed sergiors closed 9 years ago

sergiors commented 9 years ago

Hi, I'm using Backbone and Silex, but when I put 'cors.allowOrigin' => 'http://**.**.com.br' and do a request with Backbone, it happens:

The 'Access-Control-Allow-Origin' header contains multiple values 'http://***.***.com.br, *', but only one is allowed.

Do you know why this happens?

jdesrosiers commented 9 years ago

Looks like a bug. What version are you running?

sergiors commented 9 years ago
{
        "silex/silex": "~1.2",
        "doctrine/orm": "~2.4",
        "fzaninotto/faker": "~1.4",
        "symfony/validator": "~2.6",
        "dflydev/doctrine-orm-service-provider": "~1.0",
        "jdesrosiers/silex-cors-provider": "~0.1"
    }
jdesrosiers commented 9 years ago

I'm not able to reproduce the error. Is it possible that some other middleware in your project is trying to set the Access-Control-Allow-Origin header? silex-cors-provider should never set *, so I'm guessing something else might be doing that.

sergiors commented 9 years ago

you are right! the nginx added the *