@@ -23,44 +23,39 @@ export default defineConfig(({ mode }) => {
2323 proxy : {
2424 '/user-service' : {
2525 target : env . VITE_USER_SERVICE ,
26- rewrite : ( path : string ) =>
27- String ( path ) . replace && String ( path ) . replace ( / ^ \/ u s e r - s e r v i c e / , '' ) ,
26+ rewrite : ( path : string ) => path ?. replace && path . replace ( / ^ \/ u s e r - s e r v i c e / , '' ) ,
2827 changeOrigin : true ,
2928 cookiePathRewrite : {
3029 '*' : '/' ,
3130 } ,
3231 } ,
3332 '/question-service' : {
3433 target : env . VITE_QUESTION_SERVICE ,
35- rewrite : ( path : string ) =>
36- String ( path ) . replace && String ( path ) . replace ( / ^ \/ q u e s t i o n - s e r v i c e / , '' ) ,
34+ rewrite : ( path : string ) => path ?. replace && path . replace ( / ^ \/ q u e s t i o n - s e r v i c e / , '' ) ,
3735 changeOrigin : true ,
3836 cookiePathRewrite : {
3937 '*' : '/' ,
4038 } ,
4139 } ,
4240 '/collaboration-service' : {
4341 target : env . VITE_COLLAB_SERVICE ,
44- rewrite : ( path : string ) =>
45- String ( path ) . replace && String ( path ) . replace ( / ^ \/ c o l l a b o r a t i o n - s e r v i c e / , '' ) ,
42+ rewrite : ( path : string ) => path ?. replace && path . replace ( / ^ \/ c o l l a b o r a t i o n - s e r v i c e / , '' ) ,
4643 changeOrigin : true ,
4744 cookiePathRewrite : {
4845 '*' : '/' ,
4946 } ,
5047 } ,
5148 '/matching-service' : {
5249 target : env . VITE_MATCHING_SERVICE ,
53- rewrite : ( path : string ) =>
54- String ( path ) . replace && String ( path ) . replace ( / ^ \/ m a t c h i n g - s e r v i c e / , '' ) ,
50+ rewrite : ( path : string ) => path ?. replace && path . replace ( / ^ \/ m a t c h i n g - s e r v i c e / , '' ) ,
5551 changeOrigin : true ,
5652 cookiePathRewrite : {
5753 '*' : '/' ,
5854 } ,
5955 } ,
6056 '/collab-ws' : {
6157 target : `${ env . VITE_COLLAB_SERVICE . replace ( 'http' , 'ws' ) } ` ,
62- rewrite : ( path : string ) =>
63- String ( path ) . replace && String ( path ) . replace ( / \/ c o l l a b - w s / , '' ) ,
58+ rewrite : ( path : string ) => path ?. replace && path . replace ( / \/ c o l l a b - w s / , '' ) ,
6459 ws : true ,
6560 } ,
6661 '/matching-socket/' : {
0 commit comments