import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ plugins: [react()], server: { proxy: { '/api/ais': { target: 'https://aisapi.maritime.spglobal.com', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/ais/, ''), secure: true, }, '/api/rss': { target: 'https://news.google.com', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/rss/, ''), secure: true, }, '/api/gdelt': { target: 'https://api.gdeltproject.org', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/gdelt/, ''), secure: true, }, '/api/nitter1': { target: 'https://xcancel.com', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/nitter1/, ''), secure: true, }, '/api/nitter2': { target: 'https://nitter.privacydev.net', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/nitter2/, ''), secure: true, }, '/api/nitter3': { target: 'https://nitter.poast.org', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/nitter3/, ''), secure: true, }, '/api/rsshub': { target: 'https://rsshub.app', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/rsshub/, ''), secure: true, }, '/api/overpass': { target: 'https://overpass-api.de', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/overpass/, ''), secure: true, }, '/api/khoa-hls': { target: 'https://www.khoa.go.kr', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/khoa-hls/, ''), secure: true, }, '/api/kbs-hls': { target: 'https://kbsapi.loomex.net', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/kbs-hls/, ''), secure: true, }, '/api/twsyndication': { target: 'https://syndication.twitter.com', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/twsyndication/, ''), secure: true, }, '/api/publish-twitter': { target: 'https://publish.twitter.com', changeOrigin: true, rewrite: (path) => path.replace(/^\/api\/publish-twitter/, ''), secure: true, }, }, }, })