Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}"
},
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}"
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
11 changes: 9 additions & 2 deletions python/src/server/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,15 @@ def validate_supabase_url(url: str) -> bool:
raise ConfigurationError("Supabase URL cannot be empty")

parsed = urlparse(url)
if parsed.scheme != "https":
raise ConfigurationError("Supabase URL must use HTTPS")
# Allow HTTP for local development (host.docker.internal or localhost)
if parsed.scheme not in ("http", "https"):
raise ConfigurationError("Supabase URL must use HTTP or HTTPS")

# Require HTTPS for production (non-local) URLs
if parsed.scheme == "http":
hostname = parsed.hostname or ""
if not any(local in hostname for local in ["localhost", "127.0.0.1", "host.docker.internal", "0.0.0.0"]):
raise ConfigurationError("Supabase URL must use HTTPS for non-local environments")

if not parsed.netloc:
raise ConfigurationError("Invalid Supabase URL format")
Expand Down