Skip to content

Commit

Permalink
remove redundent code
Browse files Browse the repository at this point in the history
  • Loading branch information
peggles2 committed Feb 7, 2024
1 parent be90c04 commit a85b83f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion solution/backend/cmcs_regulations/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'csp.middleware.CSPMiddleware',
'regulations.middleware.JsonErrors',
'regulations.middleware.NoIndex',
'regulations.middleware.ProcessResponse',
'regcore.middleware.HtmlApi',
]
Expand Down
12 changes: 0 additions & 12 deletions solution/backend/regulations/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ def __call__(self, request):
return response


class NoIndex:
def __init__(self, get_response):
self.get_response = get_response

def __call__(self, request):
config = SiteConfiguration.objects.first()
response = self.get_response(request)
if not config.allow_indexing:
response["X-Robots-Tag"] = "noindex"
return response


class JsonErrors:
def __init__(self, get_response):
self.get_response = get_response
Expand Down

0 comments on commit a85b83f

Please sign in to comment.