Disallow API from being indexed
This commit is contained in:
parent
6d0c25128c
commit
8844aad247
3 changed files with 3 additions and 2 deletions
|
@ -39,5 +39,5 @@ urlpatterns = [
|
||||||
schema_view.with_ui("swagger", cache_timeout=60 * 60),
|
schema_view.with_ui("swagger", cache_timeout=60 * 60),
|
||||||
name="schema-swagger-ui",
|
name="schema-swagger-ui",
|
||||||
),
|
),
|
||||||
path("", RedirectView.as_view(pattern_name="api:schema-swagger-ui")),
|
path("", RedirectView.as_view(pattern_name="api:schema-swagger-ui"), name="index"),
|
||||||
] + api_urlpatterns
|
] + api_urlpatterns
|
||||||
|
|
|
@ -7,4 +7,5 @@ Disallow: /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
Disallow: {% url "wagtailadmin_home" %}
|
Disallow: {% url "wagtailadmin_home" %}
|
||||||
|
Disallow: {% url "api:index" %}
|
||||||
Sitemap: {{ sitemap }}
|
Sitemap: {{ sitemap }}
|
||||||
|
|
|
@ -45,7 +45,7 @@ urlpatterns = [
|
||||||
path("feed/", AllPagesFeed(), name="feed"),
|
path("feed/", AllPagesFeed(), name="feed"),
|
||||||
path(".health/", include("health_check.urls")),
|
path(".health/", include("health_check.urls")),
|
||||||
path("", include("website.legacy.urls")),
|
path("", include("website.legacy.urls")),
|
||||||
path("api/", include("website.api.urls")),
|
path("api/", include("website.api.urls", namespace="api")),
|
||||||
path("", include(favicon_urls)),
|
path("", include(favicon_urls)),
|
||||||
# Some say it's a bad idea to serve media with Django - I don't care
|
# Some say it's a bad idea to serve media with Django - I don't care
|
||||||
re_path(
|
re_path(
|
||||||
|
|
Loading…
Reference in a new issue