first commit
This commit is contained in:
@@ -2,5 +2,23 @@ import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [sveltekit()]
|
||||
plugins: [sveltekit()],
|
||||
server: {
|
||||
host: 'localhost',
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://10.77.48.43:3000',
|
||||
changeOrigin: true,
|
||||
configure: (proxy, _options) => {
|
||||
proxy.on('proxyReq', (proxyReq, req, _res) => {
|
||||
if (req.headers.cookie) {
|
||||
proxyReq.setHeader('Cookie', req.headers.cookie);
|
||||
}
|
||||
console.log('[Backend Proxy]', req.method, req.url, '→ Cookies:', !!req.headers.cookie);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user