Files
hihala-dashboard/vite.config.ts
fahed 8cf6f9eedd
All checks were successful
Deploy HiHala Dashboard / deploy (push) Successful in 6s
feat: add PIN-based login with server-side cookie sessions
- Server: POST /auth/login (verify PIN, set httpOnly cookie)
- Server: GET /auth/check, POST /auth/logout
- Client: Login page shown when not authenticated
- Session persists 7 days via httpOnly cookie
- PIN stored server-side only (ADMIN_PIN env var)
- Dashboard loads data only after successful auth

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 22:02:34 +03:00

35 lines
716 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
proxy: {
'/auth': {
target: 'http://localhost:3002',
changeOrigin: true,
},
'/api/erp': {
target: 'http://localhost:3002',
changeOrigin: true,
},
'/api/etl': {
target: 'http://localhost:3002',
changeOrigin: true,
},
'/api/seasons': {
target: 'http://localhost:3002',
changeOrigin: true,
},
'/api/v2': {
target: 'http://localhost:8090',
changeOrigin: true,
},
},
},
build: {
outDir: 'build',
},
});