Skip to content

Commit

Permalink
Prevent assert from cors library on preparing response to cors reques…
Browse files Browse the repository at this point in the history
…t. (#291)
  • Loading branch information
dermotduffy committed Jun 19, 2022
1 parent 26beeec commit ef7f549
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions custom_components/frigate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ def _response_header(response: aiohttp.ClientResponse) -> dict[str, str]:
# hdrs.CONTENT_LENGTH,
hdrs.CONTENT_TYPE,
hdrs.CONTENT_ENCODING,
# Strips inbound CORS response headers since the aiohttp_cors
# library will assert that they are not already present for CORS
# requests.
hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
):
continue
headers[name] = value
Expand Down

0 comments on commit ef7f549

Please sign in to comment.