Skip to content

The local proxy is not loading the central package -> proxy.conf.mjs needs to be updated #46

Description

@berndu

Hi

I have started testing the inheritance of the Central package in the June release.
The first thing I noticed was that when I use the local proxy, the Central Package does not load.

I investigated this and found:

bootstrap-config.ts
const url = ${prefix}/custom/${dashedVid}/CENTRAL_CODE.txt;
const xhr = new XMLHttpRequest();
xhr.open('GET', url, false); // 🔒 sync: finishes before Angular
xhr.setRequestHeader('Cache-Control', 'no-cache');
xhr.send(null);
if (xhr.status >= 200 && xhr.status < 300) {
nzVid = (xhr.responseText || '').trim();
}

But http://localhost:4201/nde/custom/41SLSP_ETH-ETH_CUSTOMIZING/CENTRAL_CODE.txt results in http 404

I added to the \proxy\proxy.conf.mjs another context:
{
context: [
'/nde/custom/*/CENTRAL_CODE.txt'
],
target: PROXY_TARGET,
secure: true,
changeOrigin: true,
logLevel: 'debug',
},

and CP was loaded.

Pls update your conf.

Best
Bernd

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions