summaryrefslogtreecommitdiffstats
path: root/proxy/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'proxy/utils.py')
-rw-r--r--proxy/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/proxy/utils.py b/proxy/utils.py
new file mode 100644
index 0000000..2b80f43
--- /dev/null
+++ b/proxy/utils.py
@@ -0,0 +1,7 @@
1from starlette.requests import HTTPConnection
2
3
4def get_path_with_query_string(connection: HTTPConnection) -> str:
5 path = connection.url.path
6 query_string = '?' + connection.scope['query_string'].decode() if connection.scope['query_string'] else ''
7 return f"{path}{query_string}"