I have two backend server running. I want to reverse proxy to each server depend on the API call. The below is my current rewrite config. But it only works for the /api one but not /alert-hub/api. I always got 304 when calling any API with /alert-hub/api.
{
"rewrites": [
{
"source": "/alert-hub/api/:match*",
"destination": "https://dev-growpilot.croft-ai.com/alert-hub/api/:match*"
},
{
"source": "/api/:match*",
"destination": "https://dev-growpilot.croft-ai.com/api/:match*"
},
{
"source": "/(.*)",
"destination": "/"
}
]
}