1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How to add custom http header to angular module federation remoteEntry.js load call?

Discussão em 'Angular' iniciado por Alphonse, Setembro 29, 2024.

  1. Alphonse

    Alphonse Guest

    I have a host app and few micro front end apps all are angular 15. I've used "@angular-architects/module-federation": "^15.0.3". Everything works fine, except I could not intercept the http call which loads the remoteEntry.js files of the mfe apps.

    All the mfe apps are deployed in the server, the server to fullfil the request I've to add my authorization token to the request. I tried serveral ways but could not intercept the call and add the token to it.

    1. Angulat http interceptors are not intercepting this call.
    2. Module federation did not give any option to add http request.

    Any suggestion would be greatly appreciated.

    Below is my routing, where I load the mfe

    {
    path: 'config',
    loadChildren: () =>
    loadRemoteModule({
    remoteEntry: environment.configREmoteEntryURL,
    type: "module",
    exposedModule: './Module'
    })
    .then(m => m.AppModule)
    },

    Continue reading...

Compartilhe esta Página