Skip to content

Commit

Permalink
Removed logging statements from test controller.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corneil du Plessis committed Oct 17, 2024
1 parent ee5bfa7 commit 08885cf
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
*/
@RestController
public class S3SignedRedirectRequestController {
private final static Logger logger = LoggerFactory.getLogger(S3SignedRedirectRequestController.class);

@RequestMapping("/service/token")
public ResponseEntity<Map<String, String>> getToken() {
Expand All @@ -57,7 +56,6 @@ public ResponseEntity<Resource> getManifests(@RequestHeader("Authorization") Str
@RequestMapping("/v2/test/s3-redirect-image/blobs/signed_redirect_digest")
public ResponseEntity<Map<String, String>> getBlobRedirect(@RequestHeader("Authorization") String token) {
if (!"bearer my_token_999".equals(token.trim().toLowerCase())) {
logger.info("getBlobRedirect=BAD_REQUEST");
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
HttpHeaders redirectHeaders = new HttpHeaders();
Expand All @@ -68,15 +66,12 @@ public ResponseEntity<Map<String, String>> getBlobRedirect(@RequestHeader("Autho
"&X-Amz-Expires=1200" +
"&X-Amz-SignedHeaders=host" +
"&X-Amz-Signature=test");
logger.info("getBlobRedirect:{}", redirectHeaders);
return new ResponseEntity<>(redirectHeaders, HttpStatus.TEMPORARY_REDIRECT);
}

@RequestMapping("/test/docker/registry/v2/blobs/test/data")
public ResponseEntity<Resource> getSignedBlob(@RequestHeader Map<String, String> headers) {
logger.info("getSignedBlob:{}", headers);
if (headers.containsKey("authorization")) {
logger.info("getSignedBlob=BAD_REQUEST");
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
return buildFromString("{\"config\": {\"Labels\": {\"foo\": \"bar\"} } }");
Expand Down

0 comments on commit 08885cf

Please sign in to comment.