diff --git a/mrok/proxy/app.py b/mrok/proxy/app.py index 97aec50..8a54b8c 100644 --- a/mrok/proxy/app.py +++ b/mrok/proxy/app.py @@ -172,9 +172,11 @@ def _merge_x_forwarded(self, headers: list[tuple[bytes, bytes]], scope: Scope) - headers[idx_proto] = (k, b"https") def _format_path(self, scope: Scope) -> str: - raw_path = scope.get("raw_path") - if raw_path: - return raw_path.decode() + path = scope.get("raw_path") + if path: + return path.decode() + else: + path = scope.get("path", "/") q = scope.get("query_string", b"") path = scope.get("path", "/") path_qs = path