Retrieve the XSRF token first, and set it as both the XSRF header and cookie

This commit is contained in:
Art Lowel
2023-02-07 14:49:22 +01:00
parent 6d99f51d78
commit 06de559974
6 changed files with 69 additions and 26 deletions

View File

@@ -33,6 +33,8 @@ import { Angulartics2Mock } from '../../app/shared/mocks/angulartics2.service.mo
import { AuthRequestService } from '../../app/core/auth/auth-request.service';
import { ServerAuthRequestService } from '../../app/core/auth/server-auth-request.service';
import { ServerInitService } from './server-init.service';
import { XhrFactory } from '@angular/common';
import { ServerXhrService } from '../../app/core/services/server-xhr.service';
export function createTranslateLoader(transferState: TransferState) {
return new TranslateServerLoader(transferState, 'dist/server/assets/i18n/', '.json');
@@ -104,6 +106,10 @@ export function createTranslateLoader(transferState: TransferState) {
provide: HardRedirectService,
useClass: ServerHardRedirectService,
},
{
provide: XhrFactory,
useClass: ServerXhrService,
},
]
})
export class ServerAppModule {