import { deepFreeze } from '@kbn/std' ; export const PRODUCT_ORIGIN_HEADER = 'x-elastic-product-origin' ; export const RESERVED_HEADERS = deepFreeze ( [ PRODUCT_ORIGIN_HEADER ] ) ; export const DEFAULT_HEADERS = deepFreeze ( { [ PRODUCT_ORIGIN_HEADER ] : 'kibana' , } ) ; export const getReservedHeaders = ( headerNames ) : string [ ] => { const reservedHeaders = [ ] ; for ( const headerName of headerNames ) { if ( RESERVED_HEADERS . includes ( headerName . toLowerCase ( ) ) ) { reservedHeaders . push ( headerName ) ; } } return reservedHeaders ; } ;