fix: Add https.js
This commit is contained in:
parent
dcc28483e3
commit
e844936a00
4
main.py
4
main.py
@ -51,6 +51,10 @@ if not os.path.isdir('certs'):
|
|||||||
def send_report(path):
|
def send_report(path):
|
||||||
return send_from_directory('templates/assets', path)
|
return send_from_directory('templates/assets', path)
|
||||||
|
|
||||||
|
@app.route('/https.js')
|
||||||
|
def httpsJS():
|
||||||
|
return send_from_directory('templates', 'https.js')
|
||||||
|
|
||||||
@app.route('/favicon.png')
|
@app.route('/favicon.png')
|
||||||
def faviconPNG():
|
def faviconPNG():
|
||||||
return send_from_directory('templates/assets/img', 'favicon.png')
|
return send_from_directory('templates/assets/img', 'favicon.png')
|
||||||
|
6
templates/https.js
Normal file
6
templates/https.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
if (location.protocol !== 'https:') {
|
||||||
|
location.replace(`https:${location.href.substring(location.protocol.length)}`);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log("Already Https");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user