Require explicit tagging on views taking query parameters
authorMagnus Hagander <magnus@hagander.net>
Mon, 22 Feb 2021 09:43:59 +0000 (10:43 +0100)
committerMagnus Hagander <magnus@hagander.net>
Mon, 22 Feb 2021 09:43:59 +0000 (10:43 +0100)
commit0724c08e402d0bffb0eb53192c4363dac1311fe3
tree75272afa5747967c5568f79bcb089f36ca572d62
parentb23309c95d5bb931c7d6ce4b782e919bd7449a22
Require explicit tagging on views taking query parameters

Require each view to declare which query parameters it wants, and filter
out any other parameters.

We have very few views that actually take query parameters, and random
additional query patterns will have no effect on the view. However, they
will break frontend caching (in making them look like different pages).

This will be extended into an implementation in the caching frontends as
well, btu it's needed in the backend to ensure that local testing will
have tbe same effect as the caches.
pgweb/account/views.py
pgweb/search/views.py
pgweb/util/decorators.py
pgweb/util/middleware.py