Skip to content

Commit

Permalink
Added '/v2' to the disallowed paths list that '/robots.txt' returns; …
Browse files Browse the repository at this point in the history
…removed some comments.
  • Loading branch information
IgorRodchenkov committed May 26, 2024
1 parent 340054d commit 6dbbb11
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/main/java/cpath/web/BasicController.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ final void errorResponse(ServiceQuery args,
HttpServletRequest request,
HttpServletResponse response)
{
// TODO: switch to using @RestControllerAdvice and @ExceptionHandler
try {
//log/track using a shorter message
audit(request, args, null, error);
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/cpath/web/GlobalControllerAdvice.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import cpath.service.api.OutputFormat;
import cpath.service.metadata.Datasource;
import cpath.web.args.binding.*;
import org.biopax.paxtools.model.BioPAXElement;
import org.biopax.paxtools.pattern.miner.SIFEnum;
import org.biopax.paxtools.pattern.miner.SIFType;
import org.biopax.paxtools.query.algorithm.Direction;
import org.biopax.paxtools.query.algorithm.LimitType;
Expand Down Expand Up @@ -43,6 +41,5 @@ public void registerCustomEditors(WebDataBinder binder, WebRequest request) {
binder.registerCustomEditor(GraphType.class, new GraphTypeEditor());
binder.registerCustomEditor(LimitType.class, new GraphQueryLimitEditor());
binder.registerCustomEditor(SIFType.class, new SIFTypeEditor()); //also works for the SIFEnum subclass
// binder.registerCustomEditor(SIFEnum.class, new SIFTypeEditor());
}
}
1 change: 1 addition & 0 deletions src/main/java/cpath/web/PagesController.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ String robots() {
// deny robots access to logs, web services and data files,
// but allow - to web page resources (css, js, images)
return "User-agent: *\n" +
"Disallow: /v2\n" +
"Disallow: /fetch\n" +
"Disallow: /search\n" +
"Disallow: /graph\n" +
Expand Down

0 comments on commit 6dbbb11

Please sign in to comment.