File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/service-core/src/routes/endpoints Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,16 @@ export const syncStreamed = routeDefinition({
3232 const clientId = payload . params . client_id ;
3333 const streamStart = Date . now ( ) ;
3434 // This falls back to JSON unless there's preference for the bson-stream in the Accept header.
35- const useBson = new Negotiator ( payload . request ) . mediaType ( supportedContentTypes ) == concatenatedBsonContentType ;
35+ const useBson =
36+ payload . request . headers . accept &&
37+ new Negotiator ( payload . request ) . mediaType ( supportedContentTypes ) == concatenatedBsonContentType ;
3638
3739 logger . defaultMeta = {
3840 ...logger . defaultMeta ,
3941 user_agent : userAgent ,
4042 client_id : clientId ,
41- user_id : payload . context . user_id
43+ user_id : payload . context . user_id ,
44+ bson : useBson
4245 } ;
4346
4447 if ( routerEngine . closed ) {
You can’t perform that action at this time.
0 commit comments