Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dezoomers/seadragon.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var seadragon = (function () { //Code isolation
/polona\.pl\/item\//,
/bibliotheques-specialisees\.paris\.fr\/ark/,
/nla\.gov\.au\/nla\.obj.*\/view$/,
/_files\/\d+\/\d+_\d+\.(?:jpg|png)$/,
/_files\/\d+\/\d+_\d+\.(?:jpe?g|png)$/,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Apply the advertised user-agent override in the proxy

When the caller supplies the old Chrome identity from the reported ADIF failure, functions/proxy.js:23 still forwards that identity upstream, so /proxy continues receiving the same 403 response. This change only adds .jpeg Seadragon discovery; update the shared proxy handler to send the modern user agent and cover that behavior with a proxy test.

AGENTS.md reference: AGENTS.md:L12-L12

Useful? React with 👍 / 👎.

/dzi$/
],
"contents": [
Expand Down Expand Up @@ -84,7 +84,7 @@ var seadragon = (function () { //Code isolation
}

// A single tile URL
var tileMatch = baseUrl.match(/(.*)_files\/\d+\/\d+_\d+\.(?:jpg|png)$/);
var tileMatch = baseUrl.match(/(.*)_files\/\d+\/\d+_\d+\.(?:jpe?g|png)$/);
if (tileMatch) {
// We need to detect whether the image is a dzi or an xml
var decided_xml_dzi = false, possibilities = [tileMatch[1] + ".dzi", tileMatch[1] + ".xml"], errors = [];
Expand Down
5 changes: 5 additions & 0 deletions tests/dezoomers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ test.describe("dezoomer fixture coverage", () => {
url: "https://fixtures.test/deepzoom/png_files/9/1_1.png",
expectedTile: "https://fixtures.test/deepzoom/png_files/9/1_1.png",
},
{
dezoomer: "Seadragon (Deep Zoom Image)",
url: "https://fixtures.test/deepzoom/jpeg_files/9/1_1.jpeg",
expectedTile: "https://fixtures.test/deepzoom/jpeg_files/9/1_1.jpeg",
},
{
dezoomer: "Seadragon (Deep Zoom Image)",
url: "https://fixtures.test/deepzoom/legacy-embed.html",
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/remote/fixtures.test/deepzoom/jpeg.dzi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<Image TileSize="256" Overlap="0" Format="jpeg" xmlns="http://schemas.microsoft.com/deepzoom/2008"><Size Width="512" Height="512" /></Image>
Loading