From f1b0521810bbc467721e4dcc5a2ff1bf2a1ddbb8 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 25 Oct 2017 08:01:22 -0700 Subject: [PATCH] Preserve .json through redirects --- app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.py b/app.py index 3cf5548d..5431dfd5 100644 --- a/app.py +++ b/app.py @@ -280,6 +280,8 @@ def resolve_db_name(db_name, **kwargs): ) if 'table' in kwargs: should_redirect += '/' + kwargs['table'] + if 'as_json' in kwargs: + should_redirect += kwargs['as_json'] return name, expected, should_redirect return name, expected, None