Skip to content

Commit

Permalink
Merge pull request #666 from nationalarchives/https-for-iiif-manifest…
Browse files Browse the repository at this point in the history
…-not-http

Use https for iiif manifest urls not http
  • Loading branch information
anthonyhashemi authored Nov 27, 2024
2 parents c611ad5 + 2f57a20 commit 95388e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/main/util/render_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def generate_pdf_manifest(record_id):

manifest = {
"@context": [
"http://iiif.io/api/presentation/3/context.json",
"https://iiif.io/api/presentation/3/context.json",
],
"id": f"{url_for('main.generate_manifest', record_id=record_id, _external=True, render=True)}",
"type": "Manifest",
Expand Down Expand Up @@ -173,7 +173,7 @@ def generate_image_manifest(s3_file_object, record_id):
file_url = presigned_url

manifest = {
"@context": "http://iiif.io/api/presentation/2/context.json",
"@context": "https://iiif.io/api/presentation/3/context.json",
"@id": f"{url_for('main.generate_manifest', record_id=record_id, _external=True)}",
"@type": "sc:Manifest",
"label": filename,
Expand Down
4 changes: 2 additions & 2 deletions app/tests/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_route_generate_pdf_manifest(
assert response.status_code == 200

expected_pdf_manifest = {
"@context": ["http://iiif.io/api/presentation/3/context.json"],
"@context": ["https://iiif.io/api/presentation/3/context.json"],
"behavior": ["individuals"],
"description": "Manifest for open_file_once_closed.pdf",
"id": f"http://localhost/record/{file.FileId}/manifest?render=True",
Expand Down Expand Up @@ -205,7 +205,7 @@ def test_route_generate_image_manifest(
assert response.status_code == 200

expected_image_manifest = {
"@context": "http://iiif.io/api/presentation/2/context.json",
"@context": "https://iiif.io/api/presentation/3/context.json",
"@id": f"http://localhost/record/{file.FileId}/manifest",
"@type": "sc:Manifest",
"description": f"Manifest for {file.FileName}",
Expand Down

0 comments on commit 95388e0

Please sign in to comment.