From 63f1358b2c8ad7c01e96f29f37900ebd9faa1ccd Mon Sep 17 00:00:00 2001 From: Ark2307 Date: Mon, 23 Dec 2024 22:38:28 +0530 Subject: [PATCH] fixing placement of advanced configs --- .../utils/src/main/java/com/akto/testing/ApiExecutor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/utils/src/main/java/com/akto/testing/ApiExecutor.java b/libs/utils/src/main/java/com/akto/testing/ApiExecutor.java index abe28cc3b9..fd9a6bedde 100644 --- a/libs/utils/src/main/java/com/akto/testing/ApiExecutor.java +++ b/libs/utils/src/main/java/com/akto/testing/ApiExecutor.java @@ -290,6 +290,10 @@ private static void addHeaders(OriginalHttpRequest request, Request.Builder buil public static OriginalHttpResponse sendRequest(OriginalHttpRequest request, boolean followRedirects, TestingRunConfig testingRunConfig, boolean debug, List testLogs, boolean skipSSRFCheck) throws Exception { // don't lowercase url because query params will change and will result in incorrect request + if(testingRunConfig != null && testingRunConfig.getConfigsAdvancedSettings() != null && !testingRunConfig.getConfigsAdvancedSettings().isEmpty()){ + calculateFinalRequestFromAdvancedSettings(request, testingRunConfig.getConfigsAdvancedSettings()); + } + String url = prepareUrl(request, testingRunConfig); if (!(url.contains("insertRuntimeLog") || url.contains("insertTestingLog") || url.contains("insertProtectionLog"))) { @@ -308,10 +312,6 @@ public static OriginalHttpResponse sendRequest(OriginalHttpRequest request, bool boolean executeScript = testingRunConfig != null; //calculateHashAndAddAuth(request, executeScript); - if(testingRunConfig != null && testingRunConfig.getConfigsAdvancedSettings() != null && !testingRunConfig.getConfigsAdvancedSettings().isEmpty()){ - calculateFinalRequestFromAdvancedSettings(request, testingRunConfig.getConfigsAdvancedSettings()); - } - OriginalHttpResponse response = null; HostValidator.validate(url);