[codex] add version preview workflow (#1086)
* add version preview workflow * fix sidebar group test * fix legacy usage schema migration
This commit is contained in:
+6
-1
@@ -4,12 +4,15 @@ import type { ProxyOptions } from 'vite'
|
||||
import { resolve } from 'path'
|
||||
import pkg from './package.json'
|
||||
|
||||
const BACKEND = 'http://127.0.0.1:8648'
|
||||
const FRONTEND_PORT = Number(process.env.HERMES_WEB_UI_FRONTEND_PORT || 8649)
|
||||
const BACKEND_PORT = process.env.HERMES_WEB_UI_BACKEND_PORT || '8648'
|
||||
const BACKEND = `http://127.0.0.1:${BACKEND_PORT}`
|
||||
|
||||
function createProxyConfig(): ProxyOptions {
|
||||
return {
|
||||
target: BACKEND,
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
configure: (proxy) => {
|
||||
proxy.on('proxyReq', (proxyReq) => {
|
||||
proxyReq.removeHeader('origin')
|
||||
@@ -89,6 +92,8 @@ export default defineConfig({
|
||||
],
|
||||
},
|
||||
server: {
|
||||
port: FRONTEND_PORT,
|
||||
strictPort: true,
|
||||
proxy: {
|
||||
'/api': createProxyConfig(),
|
||||
'/v1': createProxyConfig(),
|
||||
|
||||
Reference in New Issue
Block a user