Update server.py
This commit is contained in:
parent
cb3b323289
commit
85458b0db2
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ def relay():
|
||||||
return redirect("/gem?gemini=" + urlparse(fulladdr).hostname + quote(i.split(" ")[1], safe=''))
|
return redirect("/gem?gemini=" + urlparse(fulladdr).hostname + quote(i.split(" ")[1], safe=''))
|
||||||
return redirect("/gem?gemini=" + quote(i.split(" ")[1][9:], safe=''))
|
return redirect("/gem?gemini=" + quote(i.split(" ")[1][9:], safe=''))
|
||||||
elif i.split(" ")[0][0] == "1":
|
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>'
|
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="{"password" if i.split(" ")[0][1] == "1" else "text"}" name="query" autocomplete="on"><br><input type="submit" class="go" value="Go!"><br><br></form></body></html>'
|
||||||
elif i.split(" ")[0][0] == "6":
|
elif i.split(" ")[0][0] == "6":
|
||||||
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><link rel="stylesheet" href="/style.css"><title>Certificate requested</title></head><body><h1>Certificate requested</h1><p>The specified Gemini server wants a client certificate, or the certificate is invalid. <pre>{i}</pre></p><br><br><p>You can load a certificate in <a href="/">home page.</a></p></body></html>'
|
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><link rel="stylesheet" href="/style.css"><title>Certificate requested</title></head><body><h1>Certificate requested</h1><p>The specified Gemini server wants a client certificate, or the certificate is invalid. <pre>{i}</pre></p><br><br><p>You can load a certificate in <a href="/">home page.</a></p></body></html>'
|
||||||
elif i.split(" ")[0][0] != "2":
|
elif i.split(" ")[0][0] != "2":
|
||||||
|
|
Loading…
Add table
Reference in a new issue