Make one image URL per source on the generator page for host case and an empty path (closes #293) #294

Merged
clawbot merged 2 commits from issue-293-generator-canonical-source into next 2026-10-16 04:04:19 +02:00
2 Commits
Author SHA1 Message Date
sneak 96b32dab3e Make one image URL per source on the generator page for host case and an empty path (closes #293)
check / check (push) Waiting to run
The generator page put the source host and path into the encrypted URL
as entered, so CDN.Example.com and cdn.example.com, or a source URL with
no path and with the path /, made two cache keys and two upstream
requests for one image. It now parses the source URL with the host
lower-cased and an empty path written as /, as /v1/image/ reads a
source URL, before the check that pixa fetches the URL as entered. That
is a small function of its own because HandleGenerateURL is at the
linter's length limit. The README says what the token keeps.

Model: opus-5-5
2026-10-16 01:46:26 +00:00
sneak 2bedd1dd03 Test that two spellings of a source URL make one image on the generator page
check / check (push) Canceled after 0s
The generator page passes the source host and path into the encrypted
URL as entered, so a host written in upper and in lower case, or a
source URL with no path and with the path /, make two cache keys and
two upstream requests for one image. This test enters each pair on the
generator page, requests both encrypted URLs, and expects one upstream
request and a cache hit for the second. It fails until the page
lower-cases the host and writes an empty path as /.

Model: opus-5-5
2026-10-16 01:37:16 +00:00