mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 20:13:07 +00:00
Retrieve the XSRF token first, and set it as both the XSRF header and cookie
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user