Skip to content

Commit 2880e5d

Browse files
committed
Enable forwarded headers by default instead of relying on environment variable
System.getenv("HTTP_FORWARDEDHEADERS_ENABLED") returns null in Mizuho's production environment (JBoss behind reverse proxy) even though the variable is correctly set. Since x-forwarded-for header contains the real client IP, the fix is to enable forwarded headers by default, restoring v16 behavior and removing the need to configure an environment variable. Ref: https://issues.genexus.dev/viewissue.aspx?200175 Issue: https://issues.genexus.dev/viewissue.aspx?207941
1 parent b5566e6 commit 2880e5d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

java/src/main/java/com/genexus/webpanels/HttpContextWeb.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ public class HttpContextWeb extends HttpContext {
7979
private static final String SAME_SITE_LAX = "Lax";
8080
private static final String SAME_SITE_STRICT = "Strict";
8181
private static final String SET_COOKIE = "Set-Cookie";
82-
private static String httpForwardedHeadersEnabled = System.getenv("HTTP_FORWARDEDHEADERS_ENABLED");
82+
//private static String httpForwardedHeadersEnabled = System.getenv("HTTP_FORWARDEDHEADERS_ENABLED");
83+
private static String httpForwardedHeadersEnabled = "true";
8384

8485
public static final int BROWSER_OTHER = 0;
8586
public static final int BROWSER_IE = 1;

0 commit comments

Comments
 (0)