This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Description
Enable usage like this, list of domains & support wildcards in strings:
>>> @cors_headers(origin=['https://example.com', 'https://*.example.com'])
... def hello_custom_origin(example, context):
... return {'body': 'foobar'}
>>> hello_custom_origin({'headers': {'Host': 'https://foobar.example.com'}}, object())
{'body': 'foobar', 'headers': {'Access-Control-Allow-Origin': 'https://foobar.example.com'}