Add WebSocket URL to backend config API - frontend now reads from backend .env
All checks were successful
Build Frontend / Build Frontend (push) Successful in 9s
All checks were successful
Build Frontend / Build Frontend (push) Successful in 9s
- Added websocket.url to backend config - Updated /api/config/public endpoint to return WebSocket URL - Frontend now fetches WS URL from backend config API - Falls back to environment variable or auto-generated URL - Add WS_URL to backend .env: wss://api.turbotrades.dev/ws
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import SiteConfig from "../models/SiteConfig.js";
|
||||
import { config as appConfig } from "../config/index.js";
|
||||
|
||||
/**
|
||||
* Public configuration routes
|
||||
@@ -22,6 +23,11 @@ export default async function configRoutes(fastify, options) {
|
||||
scheduledEnd: config.maintenance.scheduledEnd,
|
||||
},
|
||||
|
||||
// WebSocket URL
|
||||
websocket: {
|
||||
url: appConfig.websocket.url,
|
||||
},
|
||||
|
||||
// Features
|
||||
features: {
|
||||
twoFactorAuth: config.features.twoFactorAuth,
|
||||
|
||||
Reference in New Issue
Block a user