Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

chore: adding robots txt file for not indexing the server

sriram veeraghanta02bccb44d6ab
diff --git a/apiserver/plane/urls.py b/apiserver/plane/urls.py
index e3870a393d..b692306a76 100644
--- a/apiserver/plane/urls.py
+++ b/apiserver/plane/urls.py
@@ -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")),
diff --git a/apiserver/plane/web/urls.py b/apiserver/plane/web/urls.py
index 512d4a2588..28734ad91b 100644
--- a/apiserver/plane/web/urls.py
+++ b/apiserver/plane/web/urls.py
@@ -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)]
diff --git a/apiserver/plane/web/views.py b/apiserver/plane/web/views.py
index 60f00ef0ef..8acb70a771 100644
--- a/apiserver/plane/web/views.py
+++ b/apiserver/plane/web/views.py
@@ -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")
diff --git a/apiserver/templates/about.html b/apiserver/templates/about.html
deleted file mode 100644
index 91804cda4e..0000000000
--- a/apiserver/templates/about.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-{% extends 'base.html' %}
-{% load static %}
-
-
-{% block content %}
-<h1>Hello from plane!</h1>
-<p>Made with Django</p>
-{% endblock content %}
\ No newline at end of file
diff --git a/apiserver/templates/index.html b/apiserver/templates/index.html
deleted file mode 100644
index 630ca66b6a..0000000000
--- a/apiserver/templates/index.html
+++ /dev/null
@@ -1,5 +0,0 @@
- {% extends 'base.html' %} {% load static %} {% block content %}
-<div class="container mt-5">
- <h1>Hello from plane!</h1>
-</div>
-{% endblock content %}
\ No newline at end of file