File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -272,12 +272,19 @@ export class AbpHttp extends Http {
272272 options . headers = new Headers ( ) ;
273273 }
274274
275+ this . addXRequestedWithHeader ( options ) ;
275276 this . addAuthorizationHeaders ( options ) ;
276277 this . addAspNetCoreCultureHeader ( options ) ;
277278 this . addAcceptLanguageHeader ( options ) ;
278279 this . addTenantIdHeader ( options ) ;
279280 }
280281
282+ protected addXRequestedWithHeader ( options : RequestOptionsArgs ) {
283+ if ( options . headers ) {
284+ options . headers . append ( 'X-Requested-With' , 'XMLHttpRequest' ) ;
285+ }
286+ }
287+
281288 protected addAspNetCoreCultureHeader ( options : RequestOptionsArgs ) {
282289 let cookieLangValue = this . _utilsService . getCookieValue ( "Abp.Localization.CultureName" ) ;
283290 if ( cookieLangValue && options . headers && ! options . headers . has ( '.AspNetCore.Culture' ) ) {
You can’t perform that action at this time.
0 commit comments