File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change
1
+ import * as _ from 'lodash' ;
1
2
import type {
2
3
Application as ExpressApp ,
3
4
NextFunction
@@ -70,7 +71,12 @@ export function exposeRestAPI(
70
71
const proxyPort = parseInt ( req . params . proxyPort , 10 ) ;
71
72
if ( isNaN ( proxyPort ) ) throw new StatusError ( 400 , `Could not parse required proxy port: ${ req . params . proxyPort } ` ) ;
72
73
73
- const interceptorOptions = req . body || undefined ;
74
+ let interceptorOptions = req . body ;
75
+
76
+ if ( _ . isEmpty ( interceptorOptions ) && ! _ . isEmpty ( req . query ) ) {
77
+ // TEMPORARY (drop by August 2023) fix for UI bug that briefly passed options wrong
78
+ interceptorOptions = req . query ;
79
+ }
74
80
75
81
const result = await apiModel . activateInterceptor ( interceptorId , proxyPort , interceptorOptions ) ;
76
82
res . send ( { result } ) ;
You can’t perform that action at this time.
0 commit comments