Skip to content

Commit

Permalink
Fix #450 (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoPrevato authored Dec 18, 2023
1 parent 041ff8b commit b2ad6f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.19] - 2023-12-18 :gift:

- Fixes #450, about missing `Access-Control-Allow-Credentials` response header
in CORS responses after successful pre-flight requests. Reported by @waweber

## [1.2.18] - 2023-07-14 :no_entry:

- Fixes bug #394, causing the `Content` max body size to be 2147483647
Expand Down
2 changes: 2 additions & 0 deletions blacksheep/server/cors.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ async def cors_middleware(request: Request, handler):

_set_cors_origin(response, origin_response)
response.set_header(b"Access-Control-Expose-Headers", expose_headers)
if policy.allow_credentials:
response.set_header(b"Access-Control-Allow-Credentials", b"true")

return response

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def readme():

setup(
name="blacksheep",
version="1.2.18",
version="1.2.19",
description="Fast web framework for Python asyncio",
long_description=readme(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit b2ad6f1

Please sign in to comment.