Unifomize license headers

This commit is contained in:
Alexandre Iooss 2022-03-11 17:16:11 +01:00
parent 9dc40279fa
commit 8d44182af8
51 changed files with 249 additions and 135 deletions

View file

@ -1,4 +1,5 @@
# Copyright (C) 2021 by BDE ENS Paris-Saclay
# This file is part of photo21
# Copyright (C) 2021-2022 Amicale des élèves de l'ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django.contrib.auth.mixins import LoginRequiredMixin
@ -11,8 +12,8 @@ class MediaAccess(LoginRequiredMixin, View):
def get(self, request, path):
response = HttpResponse()
# Content-type will be detected by nginx
del response['Content-Type']
response['X-Accel-Redirect'] = '/protected/media/' + path
del response["Content-Type"]
response["X-Accel-Redirect"] = "/protected/media/" + path
return response