first commit
This commit is contained in:
43
frontend/vite.config.ts
Normal file
43
frontend/vite.config.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Production Nginx configuration snippet for signal.thiessen.io:
|
||||
*
|
||||
* server {
|
||||
* listen 443 ssl;
|
||||
* server_name signal.thiessen.io;
|
||||
*
|
||||
* root /path/to/frontend/dist;
|
||||
* index index.html;
|
||||
*
|
||||
* # SPA client-side routing — fallback to index.html
|
||||
* location / {
|
||||
* try_files $uri $uri/ /index.html;
|
||||
* }
|
||||
*
|
||||
* # Proxy API requests to FastAPI backend
|
||||
* location /api/v1/ {
|
||||
* proxy_pass http://127.0.0.1:8000;
|
||||
* proxy_set_header Host $host;
|
||||
* proxy_set_header X-Real-IP $remote_addr;
|
||||
* proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
* proxy_set_header X-Forwarded-Proto $scheme;
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/api/v1/': {
|
||||
target: 'http://127.0.0.1:8000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user