Can't connect Angular app to Java backend

I have a backend at: example.com/ab

I would like to connect my local Angular environment to it

My proxy configuration:

{
  "/ab": {
    "target": "http://example.com/ab",
    "secure": false,
    "changeOrigin": true,
    "logLevel": "debug"
  }
}

But I get:

enter image description here

How to configure the proxy properly?


(This should be a comment but I don't have enough place)

Can you try :

  {
    "context": [
      '/ab',
    ],
    "target": "http://example.com",
    "secure": false,
    "changeOrigin": true,
    "logLevel": "debug"
  }