Why is this happening when we make a call to the AccountApiController.Register() method?
I agree with the main Answer by Shaun Luttin but also,
In my case: after the deployment i take this error and i found the reason is using the Hsts Preload after inserting SSL certificate. Uncommenting this lines solved the redirection, and it solved this error completely
//app.UseHsts(options => options.MaxAge(days: 18 * 7).IncludeSubdomains().Preload());