feat: implement axios client with interceptors, dashboard caching, and core application modules

This commit is contained in:
2026-06-22 15:27:19 +05:30
parent 514a656fa8
commit 39c4e1b390
11 changed files with 29 additions and 27 deletions

View File

@@ -5,25 +5,10 @@ import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: {
proxy: {
'/api/dashboard': {
target: 'https://sr-backend-api.takeleap.in',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/dashboard/, ''),
headers: {
Origin: 'https://auditor-qa.seekright.com',
Referer: 'https://auditor-qa.seekright.com/'
}
},
'/api/audit': {
target: 'https://sr-audit.takeleap.in',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/audit/, ''),
headers: {
Origin: 'https://auditor-qa.seekright.com',
Referer: 'https://auditor-qa.seekright.com/'
}
},
},
allowedHosts: true,
// Reverse proxy is no longer needed since endpoints allow CORS natively
},
preview: {
allowedHosts: true,
},
})