Skip to content

Commit

Permalink
handle robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Teun Vink committed Jul 16, 2024
1 parent d92de7f commit fb72e7f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nlnog_lg.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import requests
from commparser import BGPCommunityParser
from markupsafe import escape
from flask import Flask, abort, jsonify, render_template, request, Response, make_response
from flask import Flask, abort, jsonify, render_template, request, Response, make_response, send_from_directory
from dns.resolver import Resolver, NXDOMAIN, Timeout, NoAnswer, NoNameservers

parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -902,6 +902,12 @@ def whois():
return jsonify(output=output, title=query)


@app.route("/robots.txt")
def robots():
""" handle robots.txt
"""
return send_from_directory(app.static_folder, "robots.txt")

data = Datastore()
data.communitylist = read_communities()

Expand Down

0 comments on commit fb72e7f

Please sign in to comment.