diff --git a/src/main/java/com/gerritforge/gerrit/modules/virtualhost/VirtualHostFilter.java b/src/main/java/com/gerritforge/gerrit/modules/virtualhost/VirtualHostFilter.java
index 99eaa19..edf3491 100644
--- a/src/main/java/com/gerritforge/gerrit/modules/virtualhost/VirtualHostFilter.java
+++ b/src/main/java/com/gerritforge/gerrit/modules/virtualhost/VirtualHostFilter.java
@@ -15,6 +15,8 @@
 package com.gerritforge.gerrit.modules.virtualhost;
 
 import java.io.IOException;
+import java.util.Optional;
+
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
@@ -23,7 +25,10 @@
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 
+import com.google.common.annotations.VisibleForTesting;
+
 public class VirtualHostFilter implements Filter {
+  static final String FORWARDED_HOST_HEADER = "X-FORWARDED-HOST";
 
   @Override
   public void init(FilterConfig filterConfig) throws ServletException {}
@@ -31,10 +36,17 @@
   @Override
   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
       throws IOException, ServletException {
-    CurrentServerName.set(((HttpServletRequest) request).getServerName());
+    CurrentServerName.set(getServerNameFromRequest((HttpServletRequest) request));
+
     chain.doFilter(request, response);
   }
 
   @Override
   public void destroy() {}
+
+  @VisibleForTesting
+  static String getServerNameFromRequest(HttpServletRequest httpRequest) {
+    return Optional.ofNullable(httpRequest.getHeader(FORWARDED_HOST_HEADER))
+        .orElseGet(httpRequest::getServerName);
+  }
 }
diff --git a/src/test/java/com/gerritforge/gerrit/modules/virtualhost/VirutalHostFilterTest.java b/src/test/java/com/gerritforge/gerrit/modules/virtualhost/VirutalHostFilterTest.java
new file mode 100644
index 0000000..7e6eeaf
--- /dev/null
+++ b/src/test/java/com/gerritforge/gerrit/modules/virtualhost/VirutalHostFilterTest.java
@@ -0,0 +1,64 @@
+// Copyright (C) 2023 GerritForge Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.gerritforge.gerrit.modules.virtualhost;
+
+import static com.gerritforge.gerrit.modules.virtualhost.VirtualHostFilter.FORWARDED_HOST_HEADER;
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Test;
+
+import com.google.gerrit.common.Nullable;
+
+public class VirutalHostFilterTest {
+  private static final String DOM0_HOST = "review.gerrithub.io";
+  private static final String FORWARDED_HOST = "eclipse.gerrithub.io";
+  private static final String CLOUD_HOST = "cloud-99.provider.com";
+
+  @Test
+  public void getServerNameFromForwardedHost() {
+    HttpServletRequest requestMock = mockHttpServletRequest(CLOUD_HOST, FORWARDED_HOST);
+
+    String actual = VirtualHostFilter.getServerNameFromRequest(requestMock);
+
+    assertThat(actual).isEqualTo(FORWARDED_HOST);
+  }
+
+  @Test
+  public void getServerNameFromRequest() {
+    HttpServletRequest requestMock = mockHttpServletRequest(DOM0_HOST);
+
+    String actual = VirtualHostFilter.getServerNameFromRequest(requestMock);
+
+    assertThat(actual).isEqualTo(DOM0_HOST);
+  }
+
+  private HttpServletRequest mockHttpServletRequest(String serverName) {
+    return mockHttpServletRequest(serverName, null);
+  }
+
+  private HttpServletRequest mockHttpServletRequest(
+      String serverName, @Nullable String forwardedHost) {
+    HttpServletRequest mock = mock(HttpServletRequest.class);
+
+    when(mock.getHeader(FORWARDED_HOST_HEADER)).thenReturn(forwardedHost);
+    when(mock.getServerName()).thenReturn(serverName);
+
+    return mock;
+  }
+}
