@@ -2,7 +2,7 @@ import xss from 'xss';
22
33import { matchUrlInRouteConfigs } from './universal/core/route/routeUtils' ;
44import Preview from './universal/components/Preview' ;
5- import { HTTP_STATUS_CODES } from './universal/utils/constants' ;
5+ import { BLACKLIST_OUTPUT , HTTP_STATUS_CODES } from './universal/utils/constants' ;
66import metrics from './metrics' ;
77import {
88 renderComponent ,
@@ -13,6 +13,7 @@ import {
1313} from './universal/service/RenderService' ;
1414import Component from './universal/model/Component' ;
1515import logger from './universal/utils/logger' ;
16+ import omit from 'lodash/omit' ;
1617
1718const appConfig = require ( '__APP_CONFIG__' ) ;
1819
@@ -60,9 +61,9 @@ const render = async (req, res) => {
6061 scripts,
6162 activeComponent,
6263 componentName,
63- seoState,
6464 isPreviewQuery,
65- responseOptions
65+ responseOptions,
66+ ...responseData
6667 } = renderResponse ;
6768
6869 const statusCode = responseOptions ?. isPartialContent
@@ -71,8 +72,8 @@ const render = async (req, res) => {
7172
7273 if ( ! isPreview ( context . query ) ) {
7374 const html = renderLinksAndScripts ( output , '' , '' ) ;
74-
75- res . status ( statusCode ) . json ( { html, scripts, style : links , activeComponent, seoState } ) ;
75+ const otherParams = omit ( responseData , BLACKLIST_OUTPUT ) ;
76+ res . status ( statusCode ) . json ( { html, scripts, style : links , activeComponent, ... otherParams } ) ;
7677
7778 metrics . fragmentRequestDurationMicroseconds
7879 . labels ( componentName , isWithoutHTML ( context . query ) ? '1' : '0' )
0 commit comments