fix: update domain to aiindiacpa.duckdns.org
- nginx/default.conf: server_name aiindiacpa.duckdns.org + VPS IP (no trailing slash) - main.py: CORS default fallback updated to new domain - review.py: DASHBOARD_LINK reads from FRONTEND_URL env var (no hardcoded domain) - login_email.py: login/signup email links read from FRONTEND_URL env var - ALLOWED_ORIGINS in .env: https://aiindiacpa.duckdns.org + http://147.93.168.145 (IP on port 80 via nginx, not 8000 direct FastAPI)
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name aiindiacpa.duckdns.org 147.93.168.145;
|
||||||
|
|
||||||
# Max upload size — matches backend 10MB limit with buffer
|
# Max upload size — matches backend 10MB limit with buffer
|
||||||
client_max_body_size 15m;
|
client_max_body_size 15m;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ _ALLOWED_ORIGINS = [
|
|||||||
o.strip()
|
o.strip()
|
||||||
for o in os.getenv(
|
for o in os.getenv(
|
||||||
"ALLOWED_ORIGINS",
|
"ALLOWED_ORIGINS",
|
||||||
"https://bookkeepro.net,http://localhost:8000",
|
"https://aiindiacpa.duckdns.org,http://localhost:8000",
|
||||||
).split(",")
|
).split(",")
|
||||||
if o.strip()
|
if o.strip()
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import logging
|
import logging
|
||||||
from fastapi import APIRouter, Depends, HTTPException
|
from fastapi import APIRouter, Depends, HTTPException
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
@@ -12,7 +13,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
router = APIRouter(prefix="/api/review", tags=["review"])
|
router = APIRouter(prefix="/api/review", tags=["review"])
|
||||||
|
|
||||||
DASHBOARD_LINK = "https://bookkeepro.net/dashboard"
|
DASHBOARD_LINK = f"{os.getenv('FRONTEND_URL', 'https://aiindiacpa.duckdns.org')}/dashboard"
|
||||||
|
|
||||||
|
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
|
|||||||
@@ -1,52 +1,8 @@
|
|||||||
|
import os
|
||||||
from app.utils.emailer import send_email
|
from app.utils.emailer import send_email
|
||||||
|
|
||||||
|
_FRONTEND_URL = os.getenv("FRONTEND_URL", "https://aiindiacpa.duckdns.org")
|
||||||
|
|
||||||
# async def send_login_welcome_email(to: str, name: str | None = None):
|
|
||||||
# display_name = name or "Valued Customer"
|
|
||||||
|
|
||||||
# body = f"""
|
|
||||||
# <p>Dear {display_name},</p>
|
|
||||||
|
|
||||||
# <p>
|
|
||||||
# Welcome to <strong>BookKeepro</strong>
|
|
||||||
# </p>
|
|
||||||
|
|
||||||
# <p>
|
|
||||||
# You have successfully logged in to your account.
|
|
||||||
# We’re excited to support you with your compliance and bookkeeping needs.
|
|
||||||
# </p>
|
|
||||||
|
|
||||||
# <p>
|
|
||||||
# You can access your dashboard anytime using the link below:
|
|
||||||
# </p>
|
|
||||||
|
|
||||||
# <p>
|
|
||||||
# <a href="https://bookkeepro.net/dashboard"
|
|
||||||
# style="color:#0077c8;font-weight:600;text-decoration:none;">
|
|
||||||
# 👉 Go to Dashboard
|
|
||||||
# </a>
|
|
||||||
# </p>
|
|
||||||
|
|
||||||
# <p style="margin-top:20px;">
|
|
||||||
# If this login was not initiated by you, please contact our support team immediately.
|
|
||||||
# </p>
|
|
||||||
|
|
||||||
# <p style="margin-top:20px;">
|
|
||||||
# Kind regards,<br>
|
|
||||||
# <strong>BookKeepro Team</strong>
|
|
||||||
# </p>
|
|
||||||
# """
|
|
||||||
|
|
||||||
# await send_email(
|
|
||||||
# to=to,
|
|
||||||
# subject="Welcome to BookKeepro",
|
|
||||||
# body=body
|
|
||||||
# )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# app/utils/emailer.py
|
|
||||||
|
|
||||||
async def send_signup_welcome_email(to: str, name: str | None = None):
|
async def send_signup_welcome_email(to: str, name: str | None = None):
|
||||||
display_name = name or "Valued Customer"
|
display_name = name or "Valued Customer"
|
||||||
@@ -60,7 +16,7 @@ async def send_signup_welcome_email(to: str, name: str | None = None):
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
Your account has been successfully created.
|
Your account has been successfully created.
|
||||||
We’re excited to support you with your compliance and bookkeeping needs.
|
We're excited to support you with your compliance and bookkeeping needs.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -68,7 +24,7 @@ async def send_signup_welcome_email(to: str, name: str | None = None):
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="https://bookkeepro.net/login"
|
<a href="{_FRONTEND_URL}/login"
|
||||||
style="color:#0077c8;font-weight:600;text-decoration:none;">
|
style="color:#0077c8;font-weight:600;text-decoration:none;">
|
||||||
👉 Login to BookKeepro
|
👉 Login to BookKeepro
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user