Skip to content

Commit

Permalink
Add X-Robots-Tag to solutions responses
Browse files Browse the repository at this point in the history
  • Loading branch information
dlareau committed May 4, 2024
1 parent 648f1fd commit 5b5e308
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions huntserver/hunt_views.py
Expand Up @@ -54,6 +54,8 @@ def protected_static(request, file_path):
user = request.user
disposition = 'filename="{}_{}"'.format(puzzle.safename, path.name)
response['Content-Disposition'] = disposition
if (base == "solutions"):
response['X-Robots-Tag'] = 'noindex'
if (hunt.is_public or user.is_staff):
allowed = True
elif(base == "puzzles"): # This is messy and the most common case, this should be fixed
Expand Down

0 comments on commit 5b5e308

Please sign in to comment.