Commit Message: - Fixes an issue where the first IP from the header was used instead of the last one. Since Application Load Balancer (ALB) appends the real client IP at the end of the header, using the first value could allow attackers to spoof their IP by exploiting the header. - Refactors the test into a parameterized format to enhance readability and distinguish test cases. Key Changes in Code: - The code now correctly uses the last IP provided in the header, which is expected to be the client’s real IP as added by the ALB. - Includes new test scenarios to verify functionality under both normal and potentially malicious input conditions. Security Implication: - Ensures that the middleware will consistently filter based on the correct IP, mitigating IP spoofing attacks and enhancing security.