export * from "@solo-io/proxy-runtime/proxy" ; import { RootContext , Context , registerRootContext , FilterHeadersStatusValues , stream_context } from "@solo-io/proxy-runtime" ; class AddHeaderRoot extends RootContext { createContext ( context_id ) { return new AddHeader ( context_id , this ) ; } } class AddHeader extends Context { constructor ( context_id , root_context ) { super ( context_id , root_context ) ; } onResponseHeaders ( a , end_of_stream ) { const root_context = this . root_context ; if ( root_context . getConfiguration ( ) == "" ) { stream_context . headers . response . add ( "hello" , "world!" ) ; } else { stream_context . headers . response . add ( "hello" , root_context . getConfiguration ( ) ) ; } return FilterHeadersStatusValues . Continue ; } } registerRootContext ( ( context_id ) => { return new AddHeaderRoot ( context_id ) ; } , "add_header" ) ;