diff --git a/src/IIIFPresentation/API.Tests/Integration/GetManifestTests.cs b/src/IIIFPresentation/API.Tests/Integration/GetManifestTests.cs index 8a1bc34..450f970 100644 --- a/src/IIIFPresentation/API.Tests/Integration/GetManifestTests.cs +++ b/src/IIIFPresentation/API.Tests/Integration/GetManifestTests.cs @@ -51,6 +51,7 @@ public async Task Get_IiifManifest_Flat_ReturnsManifestFromS3_DecoratedWithDbVal // Assert response.StatusCode.Should().Be(HttpStatusCode.OK); response.Headers.Should().ContainKey(HeaderNames.ETag); + response.Headers.Vary.Should().HaveCount(2); manifest.Should().NotBeNull(); manifest!.Type.Should().Be("Manifest"); manifest.Id.Should().Be("http://localhost/1/manifests/FirstChildManifest", "requested by flat URI"); @@ -81,9 +82,10 @@ public async Task Get_IiifManifest_Hierarchical_ReturnsManifestFromS3() // Assert response.StatusCode.Should().Be(HttpStatusCode.OK); response.Headers.Should().ContainKey(HeaderNames.ETag); + response.Headers.Vary.Should().HaveCount(2); manifest.Should().NotBeNull(); manifest!.Type.Should().Be("Manifest"); manifest.Id.Should().Be("http://localhost/1/iiif-manifest", "requested by hierarchical URI"); manifest.Items.Should().HaveCount(3, "the test content contains 3 children"); } -} \ No newline at end of file +} diff --git a/src/IIIFPresentation/API/Features/Manifest/ManifestController.cs b/src/IIIFPresentation/API/Features/Manifest/ManifestController.cs index bf16da3..af17e00 100644 --- a/src/IIIFPresentation/API/Features/Manifest/ManifestController.cs +++ b/src/IIIFPresentation/API/Features/Manifest/ManifestController.cs @@ -5,6 +5,7 @@ using API.Features.Manifest.Validators; using API.Features.Storage.Helpers; using API.Infrastructure; +using API.Infrastructure.Filters; using API.Infrastructure.Helpers; using API.Infrastructure.Requests; using API.Settings; @@ -25,6 +26,7 @@ public class ManifestController(IOptions options, IAuthenticator au { [HttpGet("manifests/{id}")] [ETagCaching] + [VaryHeader] public async Task GetManifestFlat([FromRoute] int customerId, [FromRoute] string id) { var pathOnly = !Request.HasShowExtraHeader() ||