]> git.mxchange.org Git - fba.git/commitdiff
localhost path
authorEnju Aihara <9839590-EnjuAihara@users.noreply.gitlab.com>
Fri, 22 Apr 2022 17:58:43 +0000 (19:58 +0200)
committerEnju Aihara <9839590-EnjuAihara@users.noreply.gitlab.com>
Fri, 22 Apr 2022 17:58:43 +0000 (19:58 +0200)
api.py

diff --git a/api.py b/api.py
index 1f29693e0b2693b607bdbb247e447a6061247a43..20363b9e2127bd49f4be9b6557cb5599e25f55fb 100644 (file)
--- a/api.py
+++ b/api.py
@@ -55,10 +55,10 @@ def blocked(domain: str = None):
 
 @app.get(base_url+"/")
 def index(request: Request, domain: str = None):
-    blocks = get(f"http://127.0.0.1:8069/api?domain={domain}")
+    blocks = get(f"http://127.0.0.1:8069{base_url}/api?domain={domain}")
     info = None
     if domain == None:
-        info = get(f"http://127.0.0.1:8069/info")
+        info = get(f"http://127.0.0.1:8069{base_url}/info")
         if not info.ok:
             raise HTTPException(status_code=info.status_code, detail=info.text)
         info = info.json()