Skip to content

Commit

Permalink
just check for secret file specifically (#11877)
Browse files Browse the repository at this point in the history
* just check for secret file specifically

* add josh to funding
  • Loading branch information
blakeblackshear committed Jun 11, 2024
1 parent 962d213 commit b3eab17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
github:
- blakeblackshear
- NickM-27
- hawkeye217
6 changes: 1 addition & 5 deletions frigate/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ def get_jwt_secret() -> str:
)
jwt_secret = os.environ.get(JWT_SECRET_ENV_VAR)
# check docker secrets
elif (
os.path.isdir("/run/secrets")
and os.access("/run/secrets", os.R_OK)
and JWT_SECRET_ENV_VAR in os.listdir("/run/secrets")
):
elif os.path.isfile(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)):
logger.debug(f"Using jwt secret from {JWT_SECRET_ENV_VAR} docker secret file.")
jwt_secret = Path(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)).read_text()
# check for the addon options file
Expand Down

0 comments on commit b3eab17

Please sign in to comment.