Skip to content

Commit cb54558

Browse files
authored
PuppeteerHelper: use localhost (#3073)
#### Rationale My changes in LabKey/limsModules#2260 make it so insecure requests to non-loopback hosts are refused for by the puppeteer service. This PR updates the PuppeteerHelper to use localhost so the API requests don't get denied. #### Related Pull Requests - LabKey/limsModules#2260 - #3073 #### Changes - PuppeteerHelper: use localhost #### Tasks 📍 - [x] Claude Code Review - [x] TeamCity verification
1 parent a4b2524 commit cb54558

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/org/labkey/test/util/puppeteer/PuppeteerHelper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.labkey.remoteapi.SimplePostCommand;
2121
import org.labkey.remoteapi.puppeteer.PuppeteerSettings;
2222
import org.labkey.remoteapi.puppeteer.PuppeteerStatus;
23-
import org.labkey.test.WebTestHelper;
2423

2524
import java.io.IOException;
2625

@@ -37,7 +36,9 @@ public static void enableRemoteService(Connection connection) throws IOException
3736

3837
public static String getRemoteServiceURL()
3938
{
40-
return WebTestHelper.getTargetServer() + ":3031";
39+
// Note: We are explicitly using localhost here instead of WebTestHelper.getTargetServer() because on TC it will
40+
// use the hostname of the server, which is running Puppeteer with http, so API requests to it will be rejected.
41+
return "http://localhost:3031";
4142
}
4243

4344
public static PuppeteerStatus getStatus(Connection connection) throws IOException, CommandException

0 commit comments

Comments
 (0)