0
votes

I have a java application running in two ec2 instances and customer can access them using AWS application load balancer. Now the ALB can work as SSL termination point. All request goes through ALB on port 443. Working fine. The problem is in the java application sometime need to redirect to different path. As the java application does not know it is running behind SSL ALB so the redirect path includes http:// instead of https://

Is there any way to modify the protocol to https outside of my application ?

1

1 Answers

2
votes

Your Java application needs to check the x-forwarded-proto header that is set by the load balancer to determine if the initial request was http or https.