google / gae-secure-scaffold-python3

Secure scaffold for Google App Engine static and dynamic Python websites
Apache License 2.0
31 stars 16 forks source link

Preserve query params on redirect #13

Closed twentyrogersc closed 1 year ago

twentyrogersc commented 1 year ago

Issue

Currently, any query string set on the redirect path is not preserved when redirected.

Behaviour

Current: /?foo=bar -> /intl/en/ Expected: /?foo=bar -> /intl/en/?foo=bar

Setup

# Follows github.com/google/gae-secure-scaffold-python3/blob/master/examples/language-redirect/main.py

app = securescaffold.create_app(__name__)
app.add_url_rule("/", "lang_redirect", securescaffold.views.lang_redirect)

app.config["LOCALES"] = ["en"]
app.config["LOCALES_REDIRECT_TO"] = "/intl/{locale}/"