Added CORS Origin

This commit is contained in:
root 2026-02-21 10:33:37 +00:00
parent 8caf53c4e5
commit f4b7575f00
2 changed files with 47 additions and 2 deletions

View File

@ -41,10 +41,19 @@ if not cors_origin_regex:
r"|https://.*\\.ngrok\\.io"
)
# app.add_middleware(
# CORSMiddleware,
# allow_origins=cors_origins,
# allow_origin_regex=cors_origin_regex or None,
# allow_credentials=True,
# allow_methods=["*"],
# allow_headers=["*"],
# )
app.add_middleware(
CORSMiddleware,
allow_origins=cors_origins,
allow_origin_regex=cors_origin_regex or None,
allow_origins=[], # must be empty when using regex
allow_origin_regex=".*", # allow ANY origin
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],

View File

@ -0,0 +1,36 @@
module.exports = {
apps: [
{
name: "Quantfortune - Backend",
cwd: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend",
script: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend/.venv/bin/uvicorn",
args: "app.main:app --host 0.0.0.0 --port 3002",
interpreter: "none", // ✅ IMPORTANT
// exec_mode: "fork", // optional
// instances: 1, // optional
env: {
DB_HOST: "localhost",
DB_PORT: "5432",
DB_NAME: "trading_db",
DB_USER: "trader",
DB_PASSWORD: "traderpass",
DB_SCHEMA: "quant_app",
BROKER_TOKEN_KEY: "6SuYLz0n7-KM5nB_Bs6ueYgDXZZvbmf-K-WpFbOMbH4=",
SMTP_HOST: "smtp.gmail.com",
SMTP_PORT: "587",
SMTP_USER: "quantfortune@gmail.com",
SMTP_PASS: "wkbk mwbi aiqo yvwl",
SMTP_FROM_NAME: "Quantfortune Support",
SUPER_ADMIN_EMAIL: "admin@example.com",
SUPER_ADMIN_PASSWORD: "AdminPass123!",
RESET_OTP_SECRET: "change_this_secret"
}
}
]
};