fit: Site preview
All checks were successful
Build Docker / Build SLDs Image (push) Successful in 19s
Build Docker / Build Main Image (push) Successful in 20s

This commit is contained in:
Nathan Woodburn 2023-11-08 22:32:00 +11:00
parent 3c98d9e243
commit d4d987944a
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 3 additions and 7 deletions

View File

@ -37,13 +37,6 @@ def index():
@app.route('/<path:path>')
def catch_all(path):
# If file exists, load it
if os.path.isfile('templates/' + path):
return render_template(path)
# Try with .html
if os.path.isfile('templates/' + path + '.html'):
return render_template(path + '.html')
return redirect('/') # 404 catch all
# 404 catch all

View File

@ -2,4 +2,7 @@ from flask import Flask, make_response, redirect, render_template_string, reques
def render(data):
if data == "":
return "No data found for this domain"
return render_template_string(data)