Skip to content

Commit

Permalink
Remove debug endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbarnett91 committed Dec 19, 2023
1 parent faa2ca7 commit 9e7888f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package uk.gov.beis.els.controller;

import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
Expand Down Expand Up @@ -36,18 +34,4 @@ public ModelAndView renderCookiePolicy(
return modelAndView;
}

@GetMapping(value = "/print-headers")
@ResponseBody
public String printHeaders(@RequestHeader Map<String, String> headers) {
LOGGER.info("Forwarded headers:");
headers.forEach((k, v) -> LOGGER.info("{} = {}", k, v));
return "OK";
}

@GetMapping(value = "/throw-error")
@ResponseBody
public String throwError() {
throw new RuntimeException("Example error");
}

}
3 changes: 1 addition & 2 deletions src/test/java/uk/gov/beis/els/ControllerSmokeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public void abstractSetUp() {

ignoredEndpointPrefixes = Arrays.asList(
"/swagger-ui.html",
"/api-documentation",
"/throw-error");
"/api-documentation");

}

Expand Down

0 comments on commit 9e7888f

Please sign in to comment.