Configure authentication for webpack proxy

I have a .Net Web API service that works with Windows authentication enabled. I have a separate user interface for which webpack is configured. I am trying to configure the webpack proxy to access my service. Here is my current configuration

"proxy": { "/api/*": { "target": "http://localhost:50643", } } 

Now I get error 401 (unauthorized). How to configure webpack proxy to enable authentication.

+6
source share
1 answer

You can specify auth prop: "proxy": { "/api/*": { "target": "http://localhost:50643", "auth": "username:password" } }

0
source

Source: https://habr.com/ru/post/1012744/


All Articles