Update server.py
This commit is contained in:
parent
c6d4294f1a
commit
677868da32
1 changed files with 2 additions and 0 deletions
|
@ -73,6 +73,8 @@ def relay():
|
|||
i = i.replace("<", "<")
|
||||
if firstline:
|
||||
if i.split(" ")[0][0] == "3":
|
||||
if i.split(" ")[1][0] == "/":
|
||||
return redirect("/gem?gemini=" + urlparse(fulladdr).hostname + quote(i.split(" ")[1]), safe='')
|
||||
return redirect("/gem?gemini=" + quote(i.split(" ")[1][9:], safe=''))
|
||||
elif i.split(" ")[0][0] == "1":
|
||||
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><link rel="stylesheet" href="/style.css"><title>Input required</title></head><body><h1>Input required</h1><p>The specified Gemini server wants more data: <pre>{i}</pre></p><form action="/gem"><input hidden class="input" value="{url}" type="text" name="gemini"><input class="input" type="text" name="query"><br><input type="submit" class="go" value="Go!"><br><br></form></body></html>'
|
||||
|
|
Loading…
Add table
Reference in a new issue