tachyon icon indicating copy to clipboard operation
tachyon copied to clipboard

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

Open goldenapples opened this issue 2 years ago • 1 comments

(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.

goldenapples avatar Apr 22 '22 20:04 goldenapples