Flask handler for ROBOTS.txt
@mod.route("/robots.txt")
def robots_txt():
Disallow = lambda string: 'Disallow: {0}'.format(string)
return Response("User-agent: *\n{0}\n".format("\n".join([
Disallow('/bin/*'),
Disallow('/thank-you'),
])))
Written by Gabriel Falcão
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#