This release focuses on improving the performance of the Secure.set_headers
method by reducing redundant type checks. The changes optimize the efficiency when setting multiple headers, especially in frameworks that support both synchronous and asynchronous methods.
Key updates in v1.0.1:
- Performance Improvement: Reduced redundant type checks in
Secure.set_headers
andSecure.set_headers_async
. This optimizes the process by checking the response type once before looping through headers, enhancing performance for applications with multiple headers. #26 - New Tests: Added comprehensive tests to validate async and sync behavior for setting headers, ensuring compatibility across different frameworks.
Special Thanks
A big thank you to @davidwtbuxton for raising the issue and helping us improve the project.
How to Upgrade
To upgrade to v1.0.1, simply run:
pip install --upgrade secure