server-api example: trim space in token file

avoids invalid newlines in the auth header
This commit is contained in:
Min RK
2021-09-27 12:42:23 +02:00
parent a906677440
commit 9ade4bb9b2

View File

@@ -29,7 +29,7 @@ def get_token():
token_file = here.joinpath("service-token")
log.info(f"Loading token from {token_file}")
with token_file.open("r") as f:
token = f.read()
token = f.read().strip()
return token