Files
web-page/vite.config.js

44 lines
1.4 KiB
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: '127.0.0.1',
port: 3007,
strictPort: false,
proxy: {
'/api': {
target: 'https://gahusb.synology.me',
changeOrigin: true,
secure: true,
},
// Fear & Greed Index (CNN 공개 API)
// 프로덕션 nginx에서는 아래 proxy_pass 추가 필요:
// location /ext/feargreed {
// proxy_pass https://production.dataviz.cnn.io/index/fearandgreed/graphdata;
// proxy_set_header Host production.dataviz.cnn.io;
// }
'/ext/feargreed': {
target: 'https://production.dataviz.cnn.io',
changeOrigin: true,
secure: true,
rewrite: () => '/index/fearandgreed/graphdata',
},
// VIX (CBOE 변동성 지수) — Yahoo Finance 공개 API
// 프로덕션 nginx에서는 아래 proxy_pass 추가 필요:
// location /ext/vix {
// proxy_pass https://query1.finance.yahoo.com/v8/finance/chart/%5EVIX?interval=1d&range=1d;
// proxy_set_header Host query1.finance.yahoo.com;
// }
'/ext/vix': {
target: 'https://query1.finance.yahoo.com',
changeOrigin: true,
secure: true,
rewrite: () => '/v8/finance/chart/%5EVIX?interval=1d&range=1d',
},
},
},
})