0

Screen Image

I am trying to forward path to target group, so my app can handle different path as it comes from the URL. But I am getting following error Cannot GET /{path}

My requirement is to just transfer the path received in load balancer url to target group.

m4n0
  • 29,823
  • 27
  • 76
  • 89
Atul Kumar
  • 11
  • 1
  • 2
    Yes of course your app will have access to the full request. There must be something wrong with your application, port used or security groups. Can you post the full error the configuration of the target group, securitygroups and application and the code handling this route in your application – Lucasz Oct 09 '21 at 11:08

1 Answers1

0

Just got it resolved, problem was rather with express server setup. Commented the environment check and it's working fine.

//if(process.env.NODE_ENV === 'production') {
  app.get('/*', function (req, res) {
        res.sendFile(path.join(__dirname, './build', 'index.html'));
  });
//}
Atul Kumar
  • 11
  • 1