fix: use relative URLs for API requests to fix CSP block in production
Build Institutional Trader / build-and-deploy (push) Successful in 1m57s
Details
Build Institutional Trader / build-and-deploy (push) Successful in 1m57s
Details
This commit is contained in:
parent
7c67786e80
commit
dfae02c851
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useEffect, useCallback, useRef } from 'react';
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3010';
|
||||
const API_BASE = import.meta.env.VITE_API_URL || '';
|
||||
|
||||
// ─── Formatters ───────────────────────────────────────────────────────────────
|
||||
function fmtPrice(n) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useEffect } from 'react';
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3010';
|
||||
const API_BASE = import.meta.env.VITE_API_URL || '';
|
||||
|
||||
function SentimentDot({ sentiment }) {
|
||||
if (sentiment === 'BULLISH') return <span className="inline-block w-2 h-2 rounded-full bg-emerald-400 mr-2 flex-shrink-0" />;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useState, useEffect } from 'react';
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3010';
|
||||
const API_BASE = import.meta.env.VITE_API_URL || '';
|
||||
|
||||
function fmt(n, decimals = 2, prefix = '') {
|
||||
if (n == null || isNaN(n)) return '—';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
export const API_CONFIG = {
|
||||
baseUrl: import.meta.env.VITE_API_URL || 'http://localhost:3010',
|
||||
baseUrl: import.meta.env.VITE_API_URL || '',
|
||||
wsUrl: import.meta.env.VITE_WS_URL || 'ws://localhost:5010',
|
||||
timeout: parseInt(import.meta.env.VITE_API_TIMEOUT || '30000'),
|
||||
retryAttempts: parseInt(import.meta.env.VITE_API_RETRY_ATTEMPTS || '3'),
|
||||
|
|
|
|||
Loading…
Reference in New Issue