just check for secret file specifically (#11877)

* just check for secret file specifically

* add josh to funding
This commit is contained in:
Blake Blackshear 2024-06-11 07:53:12 -05:00 committed by GitHub
parent 962d213699
commit b3eab17f2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

1
.github/FUNDING.yml vendored
View File

@ -1,3 +1,4 @@
github:
- blakeblackshear
- NickM-27
- hawkeye217

View File

@ -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