Port homepage intro to fastapi

Port the main home page content to fastapi.
This commit is contained in:
Jelle van der Waa 2021-06-27 13:55:51 +02:00
parent 0a3aa40f20
commit 12911a101e
No known key found for this signature in database
GPG key ID: C06086337C50773E
5 changed files with 146 additions and 0 deletions

View file

@ -172,3 +172,13 @@ def add_samesite_fields(response: Response, value: str):
cookie += f"; SameSite={value}"
response.raw_headers[idx] = (header[0], cookie.encode())
return response
def get_ssh_fingerprints():
fingerprints = {}
fingerprint_section = aurweb.config.get_section("fingerprints")
if fingerprint_section:
fingerprints = {key: fingerprint_section[key] for key in fingerprint_section.keys()}
return fingerprints