fix: Remove any trailing period or slash
All checks were successful
Build Docker / Build_Bot_ARM (push) Successful in 24s
Build Docker / Build_Master_ARM (push) Successful in 25s
Build Docker / Build_Master_AMD (push) Successful in 54s
Build Docker / Build_Bot_AMD (push) Successful in 1m59s

This commit is contained in:
Nathan Woodburn 2024-07-19 15:47:10 +10:00
parent 4f8d80f3b6
commit 58624e152e
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -699,6 +699,13 @@ def addsite():
return jsonify({'error': 'Domain should not contain http:// or https://', 'success': 'false'}) return jsonify({'error': 'Domain should not contain http:// or https://', 'success': 'false'})
domain = domain.lower() domain = domain.lower()
# Remove any trailing / or .
if domain.endswith('/'):
domain = domain.removesuffix('/')
if domain.endswith('.'):
domain = domain.removesuffix('.')
# Check if worker file exists # Check if worker file exists
workers = None workers = None
try: try: