Skip to content

Commit

Permalink
fix: check
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 31, 2023
1 parent 8cda3f1 commit d405f02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ape/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def emit(self, record):
msg = self.format(record)

# Sanitize URLs
if "http" in msg:
parts = msg.split("http")
if "http://" in msg or "https://" in msg or "ws://" in msg or "wss://" in msg:
parts = msg.split(" http") if "http" in msg else msg.split(" ws")
rest = parts[1].split(' ')
url = f"http{rest[0].rstrip()}"
url = f"http{rest[0].strip()}"
sanitized_url = URL(url).with_user(None).with_password(None)

# If there is a path, hide it but show that you are hiding it.
Expand Down

0 comments on commit d405f02

Please sign in to comment.