larskuhtz / wai-cors

A Haskell implementation of Cross-Origin resource sharing (CORS) for Wai
MIT License
26 stars 13 forks source link

No `Vary: Origin` #1

Closed obscaenvs closed 9 years ago

obscaenvs commented 9 years ago

I have set corsVaryOrigin to True, as below, but I get no Vary: Origin in the response from the server. Fix for now for me is to set this header using WAI middleware.

corsPolicy :: CorsResourcePolicy
corsPolicy = CorsResourcePolicy
                    {
                      corsOrigins = Just (["http://example.com"], False)
                    , corsMethods = ["POST"]
                    , corsRequestHeaders = []
                    , corsExposedHeaders = Nothing
                    , corsMaxAge = Nothing
                    , corsVaryOrigin = True
                    , corsRequireOrigin = True
                    , corsIgnoreFailures = False
                    }
larskuhtz commented 9 years ago

Thanks for the bug report and my apologies that it took me so long to reply to it. The issue got fixed in PR #2. It will be included in version 0.2.4 which I am planning to release soon.