chore: adding robots txt file for not indexing the server

This commit is contained in:
sriram veeraghanta 2025-05-09 21:07:24 +05:30
parent b5634f5fa1
commit 02bccb44d6
5 changed files with 11 additions and 19 deletions

View file

@ -2,12 +2,10 @@
from django.conf import settings
from django.urls import include, path, re_path
from django.views.generic import TemplateView
handler404 = "plane.app.views.error_404.custom_404_view"
urlpatterns = [
path("", TemplateView.as_view(template_name="index.html")),
path("api/", include("plane.app.urls")),
path("api/public/", include("plane.space.urls")),
path("api/instances/", include("plane.license.urls")),

View file

@ -1,4 +1,4 @@
from django.urls import path
from django.views.generic import TemplateView
from plane.web.views import robots_txt, health_check
urlpatterns = [path("about/", TemplateView.as_view(template_name="about.html"))]
urlpatterns = [path("robots.txt", robots_txt), path("", health_check)]

View file

@ -1 +1,9 @@
# Create your views here.
from django.http import HttpResponse, JsonResponse
def health_check(request):
return JsonResponse({"status": "OK"})
def robots_txt(request):
return HttpResponse("User-agent: *\nDisallow: /", content_type="text/plain")

View file

@ -1,9 +0,0 @@
{% extends 'base.html' %}
{% load static %}
{% block content %}
<h1>Hello from plane!</h1>
<p>Made with Django</p>
{% endblock content %}

View file

@ -1,5 +0,0 @@
{% extends 'base.html' %} {% load static %} {% block content %}
<div class="container mt-5">
<h1>Hello from plane!</h1>
</div>
{% endblock content %}