Asgi-cors

Latest version: v1.0.1

Safety actively analyzes 619477 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.0.1

- Fix for a bug where applications that already serve `access-control-allow-origin` CORS headers would serve the header twice, breaking things in surprising ways. [13](https://github.com/simonw/asgi-cors/issues/13)

1.0

- Options to set `access-control-allow-headers` and `access-control-allow-methods`. Thanks, [Thorben Westerhuys](https://github.com/n0rdlicht). [#7](https://github.com/simonw/asgi-cors/pull/7)
- `callback` can now also be an `async def` function. Thanks, [Jordan Eremieff](https://github.com/jordaneremieff). [#4](https://github.com/simonw/asgi-cors/issues/4)
- Option to set `access-control-max-age` header. [12](https://github.com/simonw/asgi-cors/issues/12)

0.3

Added the `callback=` parameter:

python
def validate_origin(origin):
return origin.startswith("https://")

app = asgi_cors(app, callback=validate_origin)

0.2

Unit tests and a better README.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.