first commit
This commit is contained in:
commit
34ea15a54d
246 changed files with 18660 additions and 0 deletions
10
backend/app/services/outbound.py
Normal file
10
backend/app/services/outbound.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from urllib.parse import urlparse
|
||||
|
||||
ALLOWED_SCHEMES = {"http", "https"}
|
||||
|
||||
|
||||
def validate_outbound_url(url: str) -> str:
|
||||
parsed = urlparse(url.strip())
|
||||
if parsed.scheme not in ALLOWED_SCHEMES or not parsed.netloc:
|
||||
raise ValueError("Only http and https URLs are allowed")
|
||||
return url.strip()
|
||||
Loading…
Add table
Add a link
Reference in a new issue