Skip to content

Commit

Permalink
Limit request methods on the proxy endpoint (oncokb#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
bprize15 authored Jul 8, 2024
1 parent 066442c commit 83c662d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/mskcc/cbio/oncokb/web/rest/ApiProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.RestTemplate;
Expand Down Expand Up @@ -63,7 +64,7 @@ public class ApiProxy {

private String IP_HEADER = "X-FORWARDED-FOR";

@RequestMapping("/**")
@RequestMapping(path = "/**", method = {RequestMethod.GET, RequestMethod.POST, RequestMethod.HEAD})
public ResponseEntity<String> proxy(@RequestBody(required = false) String body, HttpMethod method, HttpServletRequest request)
throws URISyntaxException {
URI uri = apiProxyService.prepareURI(request);
Expand Down

0 comments on commit 83c662d

Please sign in to comment.