Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack-dev-server proxy stopped logging to the console as of version 4.0.0 #2677

Open
akreienbring opened this issue Sep 30, 2022 · 0 comments

Comments

@akreienbring
Copy link

Is your feature request related to a problem? Please describe.
It's not really a feature request. It's a hint that webpack-dev-server changed it's logging features with version 4.0.0.
Hence the proxy.conf.js that is delivered with the alfresco-content-app has stopped generating log outputs on the console.

module.exports = {
    "/alfresco/*": {
        "target": APP_CONFIG_ECM_HOST,
        "secure": false,
        "pathRewrite": {
            "^/alfresco": ""
        },
        "changeOrigin": true,
        **'logLevel': 'debug',**
        onProxyReq: function(request) {
          if(request["method"] !== "GET")
          request.setHeader("origin", APP_CONFIG_ECM_HOST);
        },
        // workaround for REPO-2260
        onProxyRes: function (proxyRes) {
          const header = proxyRes.headers['www-authenticate'];
          if (header && header.startsWith('Basic')) {
              proxyRes.headers['www-authenticate'] = 'x' + header;
          }
      }
    }
};

The marked setting is now invalid.

Please see here
Gihub Angular
and here:
Release Info webpack.

Describe the solution you'd like
According to the second link the functionality was replaced by infrastructureLogging as described here:
webpack logging

Would be nice, if you "reactive" proxy logging with this new method, because it's vital e.g. for finding CORS issues.

Describe alternatives you've considered
none

Additional context
none

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

No branches or pull requests

2 participants