fix: Remove any trailing period or slash
This commit is contained in:
parent
4f8d80f3b6
commit
58624e152e
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user