Getting 404 resource not found for authorization-code/callback on Load Balancer

I have integrated Okta withan ASP.NET MVC app. The app works perfectly fine when accessed on localhost and from the server’s URL. Additionally, I have a load balancer in place. However, when I attempt to access the app from the load balancer’s URL, I encounter an error after logging in, stating that the authorization code callback URL cannot be found. How can I resolve this issue? I am using an F5 load balancer.

Is the https configured correctly for the load balancer?