Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/core/xray.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
class XRayConfig(dict):
def __init__(
self,
config: Union[dict, str, PosixPath] = {},
exclude_inbound_tags: set[str] | None = set(),
fallbacks_inbound_tags: set[str] | None = set(),
config: Union[dict, str, PosixPath] | None = None,
exclude_inbound_tags: set[str] | None = None,
fallbacks_inbound_tags: set[str] | None = None,
):
"""Initialize the XRay config."""
if config is None:
config = {}
if isinstance(config, str):
# considering string as json
config = commentjson.loads(config)
Expand Down
3 changes: 2 additions & 1 deletion app/utils/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import logging.config
from copy import copy
from urllib.parse import unquote

Expand Down Expand Up @@ -88,7 +89,7 @@ def __init__(self, excluded_endpoints: list[str]):
self.excluded_endpoints = excluded_endpoints

def filter(self, record: logging.LogRecord) -> bool:
if record.args and len(record.args) >= 2:
if record.args and len(record.args) >= 3:
path = unquote(record.args[2])
return path not in self.excluded_endpoints
return True