Projet

Général

Profil

« Précédent | Suivant » 

Révision 698c4ef1

Ajouté par Jérôme Schneider il y a presque 10 ans

middleware: match url /__version__ or /__version__/

Voir les différences:

entrouvert/wsgi/middleware.py
40 40
        path += quote(environ.get('SCRIPT_NAME', ''))
41 41
        path += quote(environ.get('PATH_INFO', ''))
42 42
        method = environ.get('REQUEST_METHOD', 'GET')
43
        if method == 'GET' and path == '/__version__':
43
        if method == 'GET' and (path == '/__version__' or
44
                path == '/__version__/'):
44 45
            packages_version = self.get_packages_version()
45 46
            start_response('200 Ok', [('content-type', 'application/json')])
46 47
            return [json.dumps(packages_version)]

Formats disponibles : Unified diff