Skip to content

Commit

Permalink
fix: don't error if CORS_ORIGINS not set
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Nov 10, 2023
1 parent 8eb2206 commit 2c40af6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bento_authorization_service/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class CorsOriginsParsingSource(EnvSettingsSource):
def prepare_field_value(self, field_name: str, field: FieldInfo, value: Any, value_is_complex: bool) -> Any:
if field_name == "cors_origins":
return tuple(x.strip() for x in value.split(";"))
return tuple(x.strip() for x in value.split(";")) if value is not None else ()
return json.loads(value) if value_is_complex else value


Expand Down

0 comments on commit 2c40af6

Please sign in to comment.