@@ -1308,9 +1308,13 @@ common.returnRaw = function(params, returnCode, body, heads) {
13081308 }
13091309 return ;
13101310 }
1311- const defaultHeaders = { } ;
1311+ const defaultHeaders = {
1312+ 'Accept-CH' : 'Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version, Sec-CH-UA-Full-Version, Sec-CH-UA-Model' ,
1313+ 'Critical-CH' : 'Sec-CH-UA-Mobile, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version' ,
1314+ 'X-Countly' : 'api'
1315+ } ;
13121316 //set provided in configuration headers
1313- let headers = { } ;
1317+ let headers = { ... defaultHeaders } ;
13141318 if ( heads ) {
13151319 for ( var i in heads ) {
13161320 headers [ i ] = heads [ i ] ;
@@ -1356,7 +1360,10 @@ common.returnMessage = function(params, returnCode, message, heads, noResult = f
13561360 }
13571361 //set provided in configuration headers
13581362 const defaultHeaders = {
1359- 'Content-Type' : 'application/json; charset=utf-8'
1363+ 'Content-Type' : 'application/json; charset=utf-8' ,
1364+ 'Accept-CH' : 'Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version, Sec-CH-UA-Full-Version, Sec-CH-UA-Model' ,
1365+ 'Critical-CH' : 'Sec-CH-UA-Mobile, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version' ,
1366+ 'X-Countly' : 'api'
13601367 } ;
13611368 let headers = { ...defaultHeaders } ;
13621369 var add_headers = ( plugins . getConfig ( "security" ) . api_additional_headers || "" ) . replace ( / \r \n | \r | \n / g, "\n" ) . split ( "\n" ) ;
@@ -1431,7 +1438,10 @@ common.returnOutput = function(params, output, noescape, heads) {
14311438 }
14321439 //set provided in configuration headers
14331440 const defaultHeaders = {
1434- 'Content-Type' : 'application/json; charset=utf-8'
1441+ 'Content-Type' : 'application/json; charset=utf-8' ,
1442+ 'Accept-CH' : 'Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version, Sec-CH-UA-Full-Version, Sec-CH-UA-Model' ,
1443+ 'Critical-CH' : 'Sec-CH-UA-Mobile, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version' ,
1444+ 'X-Countly' : 'api'
14351445 } ;
14361446 let headers = { ...defaultHeaders } ;
14371447 var add_headers = ( plugins . getConfig ( "security" ) . api_additional_headers || "" ) . replace ( / \r \n | \r | \n / g, "\n" ) . split ( "\n" ) ;
0 commit comments