I have a client service built on Nextjs 13 and an express server, both of them are deployed on cloud run using artificat registry, with the ingress set to internal only and allow external load balancer.
I am using HTTP(s) global external load balancer, and I have set up a frontend service for the load balancer with a peramanent IP. In the backend I have added 2 services, the client and the server both connected with different Serverless NEGs.
Independently both the services are working fine, but when I configure the routing in the load balancer, its only one of the service which is rendered in the browser. For example:
I have set the routes client as the default, `/*` to go for the client and `/json-api/*` to go to the server backend. When I run `<ip-address>` it goes to the client Next.js app which is expected. But when I go to `<ip-address>/json-api/` It stills stays in the client app and doesn't redirect to the express server, which it was supposed to do.
I have tried doing the reverse, where server is the default and `/table` goes to the client and `/json-api` goes to the express server. It is still the same behaviour where `/table` instead of showing the Next.js page, shows the default page of Express server saying `Cannot GET /table`
Also to note, I have added the same IP address as the host for both the routing paths.