From b9035503d21773c2e4a0431859d260f12755a88a Mon Sep 17 00:00:00 2001 From: Erik Martus Date: Wed, 18 Oct 2023 15:58:26 +0000 Subject: [PATCH 1/2] add robots.txt config --- lms/urls.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/urls.py b/lms/urls.py index f02b1ecadb89..d681eee0ce57 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -9,7 +9,7 @@ from django.contrib.admin import autodiscover as django_autodiscover from django.urls import include, path, re_path from django.utils.translation import gettext_lazy as _ -from django.views.generic.base import RedirectView +from django.views.generic.base import RedirectView, TemplateView from edx_api_doc_tools import make_docs_urls from edx_django_utils.plugins import get_plugin_url_patterns @@ -1030,3 +1030,7 @@ urlpatterns += [ path('api/mfe_config/v1', include(('lms.djangoapps.mfe_config_api.urls', 'lms.djangoapps.mfe_config_api'), namespace='mfe_config_api')) ] + +urlpatterns += [ + path("robots.txt", TemplateView.as_view(template_name="robots.txt", content_type="text/plain")), +] From 6290e5507721c6f6ee8d14e5a2452649b73a8757 Mon Sep 17 00:00:00 2001 From: Erik Martus Date: Thu, 19 Oct 2023 19:02:40 +0000 Subject: [PATCH 2/2] move robots.txt to edx-platform --- lms/templates/robots.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 lms/templates/robots.txt diff --git a/lms/templates/robots.txt b/lms/templates/robots.txt new file mode 100644 index 000000000000..1f53798bb4fe --- /dev/null +++ b/lms/templates/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /