File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 4848 . WaitFor ( cache ) ;
4949
5050var frontend = builder . AddViteApp ( "chatui-fe" , "../chatui" )
51- . WithEnvironment ( "BACKEND_URL" , chatapi . GetEndpoint ( "http" ) )
52- . WithOtlpExporter ( )
51+ . WithReference ( chatapi )
5352 . WithEnvironment ( "BROWSER" , "none" ) ;
5453
5554// We use YARP as the static file server and reverse proxy.
5857 . PublishWithStaticFiles ( frontend )
5958 . WithConfiguration ( c =>
6059 {
61- c . AddRoute ( "/api/{**catch-all}" , chatapi . GetEndpoint ( "http" ) ) ;
62- } ) ;
60+ c . AddRoute ( "/api/{**catch-all}" , chatapi ) ;
61+ } )
62+ . WithExplicitStart ( ) ;
6363
6464builder . Build ( ) . Run ( ) ;
6565
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ export default defineConfig({
1111 port,
1212 proxy : {
1313 '/api' : {
14- target : process . env . BACKEND_URL ,
14+ target : process . env . CHATAPI_HTTPS || process . env . CHATAPI_HTTP ,
1515 changeOrigin : true ,
1616 } ,
1717 '/api/chat/stream' : {
18- target : process . env . BACKEND_URL ,
18+ target : process . env . CHATAPI_HTTPS || process . env . CHATAPI_HTTP ,
1919 ws : true ,
2020 changeOrigin : true ,
2121 }
You can’t perform that action at this time.
0 commit comments