I did redirect to external link in asp.net core in local
public async Task<IActionResult> Fallback(string transactionId, [FromForm] FallbackRequest fallbackRequest)
{
var result = await _opayoPaymentService.FallbackRequest(transactionId, fallbackRequest);
return Redirect($"http://localhost:4200/payment-done/{transactionId}/{result.Status}");
}
http://localhost:4200/
this is local on local environment (Angular project).
Now, the Angular project is on production. The url is http://production-url/
Now I want to redirect the production url.
How can I add both urls? When the project runs in production, then production url should be redirected, when the project runs locally, then localhost url should be redirected.