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' ;
12import type {
23 Application as ExpressApp ,
34 NextFunction
@@ -70,7 +71,12 @@ export function exposeRestAPI(
7071 const proxyPort = parseInt ( req . params . proxyPort , 10 ) ;
7172 if ( isNaN ( proxyPort ) ) throw new StatusError ( 400 , `Could not parse required proxy port: ${ req . params . proxyPort } ` ) ;
7273
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+ }
7480
7581 const result = await apiModel . activateInterceptor ( interceptorId , proxyPort , interceptorOptions ) ;
7682 res . send ( { result } ) ;
You can’t perform that action at this time.
0 commit comments