fix: Inject ssl based on host only
This commit is contained in:
parent
1b6536d8ae
commit
dcc28483e3
2
main.py
2
main.py
@ -73,7 +73,7 @@ def index():
|
|||||||
with open(f'sites/{host}.json') as file:
|
with open(f'sites/{host}.json') as file:
|
||||||
data = json.load(file)
|
data = json.load(file)
|
||||||
|
|
||||||
return render.site(data, True)
|
return render.site(data, host)
|
||||||
return redirect(f'https://{DOMAINS[0]}')
|
return redirect(f'https://{DOMAINS[0]}')
|
||||||
|
|
||||||
@app.route('/site')
|
@app.route('/site')
|
||||||
|
@ -91,7 +91,7 @@ def site(data, injectSSL = False):
|
|||||||
|
|
||||||
ssl = ''
|
ssl = ''
|
||||||
if injectSSL:
|
if injectSSL:
|
||||||
ssl = '<script src="https://nathan.woodburn/https.js" async=""></script>'
|
ssl = f'<script src="https://{injectSSL}/https.js" async=""></script>'
|
||||||
page = "page.html"
|
page = "page.html"
|
||||||
if data['image'] == "":
|
if data['image'] == "":
|
||||||
page = "page_no_image.html"
|
page = "page_no_image.html"
|
||||||
|
Loading…
Reference in New Issue
Block a user