Skip to content

Commit

Permalink
Merge pull request #1390 from ncrum/QA561
Browse files Browse the repository at this point in the history
#1389 - updated robots.txt controller to include setting the site instance
  • Loading branch information
phillipuniverse committed Jun 8, 2015
2 parents 3330b5d + 8a6e5f5 commit 775b8c3
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -27,6 +27,7 @@
import org.broadleafcommerce.common.time.SystemTime;
import org.broadleafcommerce.common.web.BaseUrlResolver;
import org.broadleafcommerce.common.web.BroadleafRequestContext;
import org.broadleafcommerce.common.web.resource.BroadleafContextUtil;

import java.util.HashMap;
import java.util.Map;
Expand All @@ -53,10 +54,13 @@ public class BroadleafRobotsController {

@Resource(name = "blPageService")
private PageService pageService;

@Resource(name = "blBroadleafContextUtil")
protected BroadleafContextUtil blcContextUtil;

public String getRobotsFile(HttpServletRequest request, HttpServletResponse response) {
BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext();

blcContextUtil.establishThinRequestContext();
response.setContentType("text/plain");
response.setCharacterEncoding("UTF-8");

Expand Down

0 comments on commit 775b8c3

Please sign in to comment.