Restore contact form and allow new host
This commit is contained in:
@@ -11,6 +11,7 @@ RATE_LIMIT_MAX_REQUESTS = 5
|
||||
MESSAGES_STORAGE = "portfolio_contact_messages"
|
||||
ALLOWED_ORIGINS = {
|
||||
"https://luna.reversed.dev",
|
||||
"https://luna.spaceistyping.com",
|
||||
"http://localhost:5173",
|
||||
"http://localhost:4173",
|
||||
}
|
||||
@@ -18,7 +19,7 @@ EMAIL_RE = re.compile(r"^[^\s@]+@[^\s@]+\.[^\s@]+$")
|
||||
|
||||
|
||||
def _cors_headers(origin=""):
|
||||
allowed_origin = origin if origin in ALLOWED_ORIGINS else "https://luna.reversed.dev"
|
||||
allowed_origin = origin if origin in ALLOWED_ORIGINS else "https://luna.spaceistyping.com"
|
||||
return {
|
||||
"Access-Control-Allow-Origin": allowed_origin,
|
||||
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
|
||||
|
||||
Reference in New Issue
Block a user