init: hermes-web-ui v0.1.0
Hermes Agent Web 管理面板,支持对话交互和定时任务管理。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import type { ProxyOptions } from 'vite'
|
||||
import { resolve } from 'path'
|
||||
|
||||
function createProxyConfig(): ProxyOptions {
|
||||
return {
|
||||
target: 'http://127.0.0.1:8642',
|
||||
changeOrigin: true,
|
||||
configure: (proxy) => {
|
||||
proxy.on('proxyReq', (proxyReq) => {
|
||||
proxyReq.removeHeader('origin')
|
||||
proxyReq.removeHeader('referer')
|
||||
})
|
||||
// Disable response buffering for SSE streaming
|
||||
proxy.on('proxyRes', (proxyRes) => {
|
||||
proxyRes.headers['cache-control'] = 'no-cache'
|
||||
proxyRes.headers['x-accel-buffering'] = 'no'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
compress: false,
|
||||
proxy: {
|
||||
'/api': createProxyConfig(),
|
||||
'/v1': createProxyConfig(),
|
||||
'/health': createProxyConfig(),
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user