Conversation
for more information, see https://pre-commit.ci
|
Given that |
|
My use-case is that I'd like to have links to pages like |
|
So if I understand correctly, in this scenario you (or some proxy) are creating/embedding tracking IDs into static files for tracking/metrics purposes? |
|
Yes, essentially that's right. The example I used is for tracking conversion rates from Facebook ads. But the use case is actually still broader. Concretely, I'm using whitenoise to serve a NextJS statically generated app. This means that I have several Technically I can do what I need by including a trailing slash in all URLs (thus bypassing the redirect), but that's ugly and more importantly error prone as it's easy to forget. |
|
Okay I understand the benefit. Would you be interested in duplicating this PR into ServeStatic? For the last 5 years, things have been moving fairly slowly in |
|
@Archmonger Done, see Archmonger/ServeStatic#48 |
Hi there 👋
On one of my Django projects, I got tripped up by whitenoise stripping query strings on redirect, so for example
/foo?bar=bazredirects to/foo/when I was expecting it to instead redirect to/foo/?bar=baz. Would you be open to merging a patch that preserves the query string on redirect?I'm opening a pull request to show what an implementation could look like and to start the discussion. If you're happy with the proposal, I can work on putting the functionality behind a setting (to not break backwards compatibility), unit tests, and what-ever else is needed.
Thanks for your time!