fixing web-app
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
// Development server configuration with API proxy
|
||||
// This forwards API requests from webpack-dev-server to the gateway
|
||||
|
||||
if (config.mode !== 'production') {
|
||||
config.devServer = {
|
||||
...config.devServer,
|
||||
|
||||
// Proxy API requests to the gateway - using modern object syntax
|
||||
proxy: {
|
||||
'/api/**': {
|
||||
target: 'http://localhost:8081',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
logLevel: 'debug',
|
||||
pathRewrite: {
|
||||
'^/api': '/api' // Keep the /api prefix for gateway routing
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Disable all caches as requested in previous issue
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
'Pragma': 'no-cache',
|
||||
'Expires': '0'
|
||||
},
|
||||
|
||||
// Development middleware settings
|
||||
devMiddleware: {
|
||||
writeToDisk: false,
|
||||
stats: 'minimal'
|
||||
},
|
||||
|
||||
// Static files configuration
|
||||
static: {
|
||||
directory: 'src/commonMain/resources',
|
||||
serveIndex: true,
|
||||
watch: true
|
||||
},
|
||||
|
||||
// CORS settings for development
|
||||
allowedHosts: 'all',
|
||||
historyApiFallback: true,
|
||||
hot: true,
|
||||
liveReload: true
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user