localhost path
This commit is contained in:
parent
8f96bdec3d
commit
b28453a083
4
api.py
4
api.py
@ -55,10 +55,10 @@ def blocked(domain: str = None):
|
|||||||
|
|
||||||
@app.get(base_url+"/")
|
@app.get(base_url+"/")
|
||||||
def index(request: Request, domain: str = None):
|
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
|
info = None
|
||||||
if domain == 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:
|
if not info.ok:
|
||||||
raise HTTPException(status_code=info.status_code, detail=info.text)
|
raise HTTPException(status_code=info.status_code, detail=info.text)
|
||||||
info = info.json()
|
info = info.json()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user