diff --git a/apiserver/plane/urls.py b/apiserver/plane/urls.py index e3870a393..b692306a7 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 512d4a258..28734ad91 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 60f00ef0e..8acb70a77 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 91804cda4..000000000 --- a/apiserver/templates/about.html +++ /dev/null @@ -1,9 +0,0 @@ - -{% extends 'base.html' %} -{% load static %} - - -{% block content %} -

Hello from plane!

-

Made with Django

-{% 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 630ca66b6..000000000 --- a/apiserver/templates/index.html +++ /dev/null @@ -1,5 +0,0 @@ - {% extends 'base.html' %} {% load static %} {% block content %} -
-

Hello from plane!

-
-{% endblock content %} \ No newline at end of file