prince1604 commited on
Commit
10f7304
·
1 Parent(s): c3a843f

Polish: Auto-add https scheme if missing

Browse files
Files changed (1) hide show
  1. api.py +4 -0
api.py CHANGED
@@ -214,6 +214,10 @@ def start_scan(
214
  content={"error": "Must provide either JSON body or query parameters (domain required)"}
215
  )
216
 
 
 
 
 
217
  job_id = str(uuid4())
218
  JOBS[job_id] = {
219
  "status": "pending",
 
214
  content={"error": "Must provide either JSON body or query parameters (domain required)"}
215
  )
216
 
217
+ # Ensure domain has scheme
218
+ if target_domain and not target_domain.startswith(('http://', 'https://')):
219
+ target_domain = f"https://{target_domain}"
220
+
221
  job_id = str(uuid4())
222
  JOBS[job_id] = {
223
  "status": "pending",