This is an automated email from the ASF dual-hosted git repository.

thiagohp pushed a commit to branch javax
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git


The following commit(s) were added to refs/heads/javax by this push:
     new 3ff87ef11 TAP5-2810: using BaseURLSource to get ES shims' URLs
3ff87ef11 is described below

commit 3ff87ef11726570d5ae8aea868a3c1eb5c6557b0
Author: Thiago H. de Paula Figueiredo <[email protected]>
AuthorDate: Sat May 16 11:20:05 2026 -0300

    TAP5-2810: using BaseURLSource to get ES shims' URLs
---
 .../tapestry5/internal/services/ajax/EsShimManagerImpl.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/EsShimManagerImpl.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/EsShimManagerImpl.java
index 1c6e87017..4aa087b3b 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/EsShimManagerImpl.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/EsShimManagerImpl.java
@@ -16,6 +16,8 @@ import java.util.Map;
 
 import org.apache.tapestry5.SymbolConstants;
 import org.apache.tapestry5.commons.Resource;
+import org.apache.tapestry5.http.services.BaseURLSource;
+import org.apache.tapestry5.http.services.Request;
 import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.services.PathConstructor;
 import org.apache.tapestry5.services.javascript.EsShimManager;
@@ -31,12 +33,18 @@ public class EsShimManagerImpl implements EsShimManager
     
     private final String assetPrefix;
     
+    private final BaseURLSource baseURLSource;
+    
+    private final Request request;
+    
     private final String compressedRequestPrefix;
     
     private final String uncompressedRequestPrefix;
     
     public EsShimManagerImpl(Map<String, Resource> shims,
             PathConstructor pathConstructor,
+            BaseURLSource baseURLSource,
+            Request request,
             @Symbol(SymbolConstants.ASSET_PATH_PREFIX)
             String assetPrefix) 
     {
@@ -44,6 +52,8 @@ public class EsShimManagerImpl implements EsShimManager
         this.shims = shims;
         this.assetPrefix = assetPrefix;
         this.pathConstructor = pathConstructor;
+        this.baseURLSource = baseURLSource;
+        this.request = request;
         this.compressedRequestPrefix = getRequestPrefixUncached(true);
         this.uncompressedRequestPrefix = getRequestPrefixUncached(false);
     }
@@ -71,7 +81,8 @@ public class EsShimManagerImpl implements EsShimManager
 
     @Override
     public String getUrl(String moduleName) {
-        return getRequestPrefix(true) + moduleName + ".js";
+        return baseURLSource.getBaseURL(request.isSecure()) + 
+                getRequestPrefix(true) + moduleName + ".js";
     }
     
 }

Reply via email to