Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Dec 17, 2024
1 parent c0d760f commit 814940b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion timetagger/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ async def get_webtoken_localhost(request, auth_info):
hostname is localhost. See `get_webtoken_unsafe()` for details.
"""
if not config.bind.startswith("127.0.0.1"):
return 403, {}, "Can only login via localhost if the server address (config.bind) is '127.0.0.1'"
return (
403,
{},
"Can only login via localhost if the server address (config.bind) is '127.0.0.1'",
)
# Don't allow localhost validation when proxy auth is enabled
if config.proxy_auth_enabled:
return 403, {}, "forbidden: disabled when proxy auth is available"
Expand Down

0 comments on commit 814940b

Please sign in to comment.