aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-08-19 23:57:31 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-08-19 23:57:31 -0700
commitc15cbf3568f7d91774e1cb82a39474c0ff874616 (patch)
treebe5dffb5f735ab497c9affe155fd82267ed4b412 /python
parentc6b33542398c933a6272586e6280f7026b63a124 (diff)
downloadfatcat-c15cbf3568f7d91774e1cb82a39474c0ff874616.tar.gz
fatcat-c15cbf3568f7d91774e1cb82a39474c0ff874616.zip
sitemap fixes from testing
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_web/routes.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index c66c7f0c..9ae2eaa9 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -1158,7 +1158,7 @@ def page_rfc():
@app.route('/robots.txt', methods=['GET'])
def page_robots_txt():
- if conf.FATCAT_DOMAIN == "fatcat.wiki":
+ if app.config['FATCAT_DOMAIN'] == "fatcat.wiki":
robots_path = "robots.txt"
else:
robots_path = "robots.deny_all.txt"
@@ -1168,7 +1168,7 @@ def page_robots_txt():
@app.route('/sitemap.xml', methods=['GET'])
def page_sitemap_xml():
- if conf.FATCAT_DOMAIN == "fatcat.wiki":
- return redirect('/sitemaps/sitemap.xml')
- else:
- abort(404)
+ return send_from_directory(os.path.join(app.root_path, 'static'),
+ "sitemap.xml",
+ mimetype='text/xml')
+