mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
add a setting to hide commafeed from search engines
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.commafeed.frontend.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@Singleton
|
||||
public class RobotsTxtDisallowAllServlet extends HttpServlet {
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
|
||||
resp.setContentType("text/plain");
|
||||
resp.getWriter().write("User-agent: *");
|
||||
resp.getWriter().write("\n");
|
||||
resp.getWriter().write("Disallow: /");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user