Azure CDN Standard - Origin override rules engine not working
I'm using Azure CDN Standard with 1 endpoint. I have 1 origin that serves the domain.com and another origin to serve a REST API which I want request at domain.com/api
I have setup 2 origin groups, 1 for the web and 1 for the rest api. I used the rules engine with conditional URL path contains /api and origin group override with the origin group the rest api belongs but when I browse domain.com/api I get Not Found
page.
Also when I refresh the azure rules engine page, sometimes the override group origin is unset and the list is empty.
Does anyone know what the issue is?