

def test_varying_origin(self):
    ' Resources that wish to enable themselves to be shared with\n            multiple Origins but do not respond uniformly with "*" must\n            in practice generate the Access-Control-Allow-Origin header\n            dynamically in response to every request they wish to allow.\n\n            As a consequence, authors of such resources should send a Vary:\n            Origin HTTP header or provide other appropriate control directives\n            to prevent caching of such responses, which may be inaccurate if\n            re-used across-origins.\n        '
    example_origin = 'http://foo.com'
    for resp in self.iter_responses('/test_vary', origin=example_origin):
        resp.assertHasACLOrigin(resp)
        self.assertEqual(resp.headers.get('Vary'), 'Origin')

dataset/ETHPy150Open corydolphin/flask-cors/tests/decorator/test_vary_header.py VaryHeaderTestCase.test_varying_origin/VarMisuse@32/235 `self`->`resp`