Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept standard argument formats for "false" attributes passed through query args #143

Open
goldenapples opened this issue Apr 22, 2022 · 1 comment

Comments

@goldenapples
Copy link

(Leaving this issue here just so I don't forget about it over the weekend.)

While troubleshooting an issue trying to bypass the automatic webp formatting with @smccafferty, we noted that none of the expected formats (?webp=false, ?webp=0, ?webp=no) for setting the webp query argument to false worked as we'd expected. I guess this makes sense, because URL query parameters are interpreted as strings both by the URLSearchParameters() js API and by AWS Lambda's queryStringParams. But it was surprising that 'false', '0', and 'no' all evaluated as true.

Sean was able to work out that setting the attribute to an empty string, like ?webp=, works for disabling webp. But I'd like to see a more intuitive interface.

@joehoyle
Copy link
Member

joehoyle commented Sep 4, 2023

Good catch, think it would be good to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants