{"action":"created","issue":{"url":"https://api.github.com/repos/troygoode/node-cors/issues/39","labels_url":"https://api.github.com/repos/troygoode/node-cors/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/troygoode/node-cors/issues/39/comments","events_url":"https://api.github.com/repos/troygoode/node-cors/issues/39/events","html_url":"https://github.com/troygoode/node-cors/pull/39","id":63569753,"number":39,"title":"Fix \"Vary: origin\" header added for \"*\"","user":{"login":"etiktin","id":4381579,"avatar_url":"https://avatars.githubusercontent.com/u/4381579?v=3","gravatar_id":"","url":"https://api.github.com/users/etiktin","html_url":"https://github.com/etiktin","followers_url":"https://api.github.com/users/etiktin/followers","following_url":"https://api.github.com/users/etiktin/following{/other_user}","gists_url":"https://api.github.com/users/etiktin/gists{/gist_id}","starred_url":"https://api.github.com/users/etiktin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etiktin/subscriptions","organizations_url":"https://api.github.com/users/etiktin/orgs","repos_url":"https://api.github.com/users/etiktin/repos","events_url":"https://api.github.com/users/etiktin/events{/privacy}","received_events_url":"https://api.github.com/users/etiktin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-22T20:03:33Z","updated_at":"2015-04-27T18:50:39Z","closed_at":"2015-04-16T00:58:55Z","pull_request":{"url":"https://api.github.com/repos/troygoode/node-cors/pulls/39","html_url":"https://github.com/troygoode/node-cors/pull/39","diff_url":"https://github.com/troygoode/node-cors/pull/39.diff","patch_url":"https://github.com/troygoode/node-cors/pull/39.patch"},"body":"The \"Vary: origin\" header should be added only for specific origins, but currently the code adds it also to the wildcard origin (\"\\*\"). This would happen even if you called cors() without options, because the default origin is set to \"\\*\".\r\nThe issue is with the first condition in the configureOrigin function. If origin is not falsy, vary will be added. To fix this I just expanded the condition to check if the origin is \"\\*\"."},"comment":{"url":"https://api.github.com/repos/troygoode/node-cors/issues/comments/96777963","html_url":"https://github.com/troygoode/node-cors/pull/39#issuecomment-96777963","issue_url":"https://api.github.com/repos/troygoode/node-cors/issues/39","id":96777963,"user":{"login":"troygoode","id":72844,"avatar_url":"https://avatars.githubusercontent.com/u/72844?v=3","gravatar_id":"","url":"https://api.github.com/users/troygoode","html_url":"https://github.com/troygoode","followers_url":"https://api.github.com/users/troygoode/followers","following_url":"https://api.github.com/users/troygoode/following{/other_user}","gists_url":"https://api.github.com/users/troygoode/gists{/gist_id}","starred_url":"https://api.github.com/users/troygoode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troygoode/subscriptions","organizations_url":"https://api.github.com/users/troygoode/orgs","repos_url":"https://api.github.com/users/troygoode/repos","events_url":"https://api.github.com/users/troygoode/events{/privacy}","received_events_url":"https://api.github.com/users/troygoode/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T18:50:39Z","updated_at":"2015-04-27T18:50:39Z","body":"published to npm as `2.6`"}}