From 6453d1528fef23eb02b7e33d09a05730a15bfb1c Mon Sep 17 00:00:00 2001 From: mbklein Date: Thu, 12 Dec 2024 21:39:21 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20samvera/?= =?UTF-8?q?serverless-iiif@509d24082692d755c5ad8fa48d9e447722ce5741=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- .../docs/quick-start/infrastructure/cloudformation.json | 0 .../docs/quick-start/infrastructure/terraform.json | 0 _next/static/chunks/nextra-data-en-US.json | 2 +- .../pages/docs/custom-sharp-layer-1b87a5d81904c822.js | 1 - .../pages/docs/custom-sharp-layer-7ca61df03454b1d4.js | 1 + .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 about.html | 4 ++-- docs.html | 4 ++-- docs/advanced-usage/cors.html | 4 ++-- docs/advanced-usage/request-response-functions.html | 4 ++-- docs/communities/iiif.html | 2 +- docs/communities/samvera.html | 2 +- docs/contributors.html | 4 ++-- docs/custom-sharp-layer.html | 6 +++--- docs/how-to-contribute.html | 4 ++-- docs/notes.html | 4 ++-- docs/quick-start.html | 2 +- docs/quick-start/deleting-the-app.html | 4 ++-- docs/quick-start/deployment-command-line.html | 4 ++-- docs/quick-start/deployment-sam.html | 4 ++-- docs/quick-start/infrastructure.html | 4 ++-- docs/quick-start/infrastructure/cloudformation.html | 4 ++-- docs/quick-start/infrastructure/terraform.html | 4 ++-- docs/source-images.html | 4 ++-- docs/testing.html | 4 ++-- index.html | 2 +- 28 files changed, 41 insertions(+), 41 deletions(-) rename _next/data/{sX4dPFJPtFuAx8QDjwBRx => sI4db0zedYvA4PHYbG3Fg}/docs/quick-start/infrastructure/cloudformation.json (100%) rename _next/data/{sX4dPFJPtFuAx8QDjwBRx => sI4db0zedYvA4PHYbG3Fg}/docs/quick-start/infrastructure/terraform.json (100%) delete mode 100644 _next/static/chunks/pages/docs/custom-sharp-layer-1b87a5d81904c822.js create mode 100644 _next/static/chunks/pages/docs/custom-sharp-layer-7ca61df03454b1d4.js rename _next/static/{sX4dPFJPtFuAx8QDjwBRx => sI4db0zedYvA4PHYbG3Fg}/_buildManifest.js (97%) rename _next/static/{sX4dPFJPtFuAx8QDjwBRx => sI4db0zedYvA4PHYbG3Fg}/_ssgManifest.js (100%) diff --git a/404.html b/404.html index 968be41..bac9394 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/_next/data/sX4dPFJPtFuAx8QDjwBRx/docs/quick-start/infrastructure/cloudformation.json b/_next/data/sI4db0zedYvA4PHYbG3Fg/docs/quick-start/infrastructure/cloudformation.json similarity index 100% rename from _next/data/sX4dPFJPtFuAx8QDjwBRx/docs/quick-start/infrastructure/cloudformation.json rename to _next/data/sI4db0zedYvA4PHYbG3Fg/docs/quick-start/infrastructure/cloudformation.json diff --git a/_next/data/sX4dPFJPtFuAx8QDjwBRx/docs/quick-start/infrastructure/terraform.json b/_next/data/sI4db0zedYvA4PHYbG3Fg/docs/quick-start/infrastructure/terraform.json similarity index 100% rename from _next/data/sX4dPFJPtFuAx8QDjwBRx/docs/quick-start/infrastructure/terraform.json rename to _next/data/sI4db0zedYvA4PHYbG3Fg/docs/quick-start/infrastructure/terraform.json diff --git a/_next/static/chunks/nextra-data-en-US.json b/_next/static/chunks/nextra-data-en-US.json index baf1c4d..8b861b9 100644 --- a/_next/static/chunks/nextra-data-en-US.json +++ b/_next/static/chunks/nextra-data-en-US.json @@ -1 +1 @@ -{"/about":{"title":"About","data":{"iiif-in-the-cloud#IIIF in the Cloud":"Access is bursty by nature\nTile requests are at least an order of magnitude burstier\nVery hard to scale a server-based solution in a way that can handle the bursts without wasting capacity (and money)","solution#Solution":"","under-the-hood#Under the Hood":"","libvips#libvips":"“A demand-driven, horizontally threaded image processing library”\nVery fast and extremely lightweight\nCan perform more than 300 different image manipulation operations\nSupports a large number of image formats\nMost importantly (for our purposes), it supports multi-resolution images\nand tiling\nDocumentation ↗","sharp#sharp":"Fast native Node.js wrapper for libvips\nSupports seeking and streaming of image data without making a local copy\nDocumentation ↗","contributors#Contributors":"Michael B. Klein - Northwestern University Libraries\nJustin Gondron\nRob Kaufman - Notch 8\nEdward Silverton - Mnemoscene\nTrey Pendragon - Princeton University Libraries\nTheia Wolfe","license#License":"Serverless IIIF is available under the Apache 2.0 license."}},"/docs/advanced-usage/cors":{"title":"Cross-Origin Request Sharing (CORS)","data":{"":"For security reasons, web browsers have built in limits on what sort of requests can be made to a given domain from a page hosted under a different domain. Since this is a common use case for IIIF (resources embedded in pages whose domains differ from that of the server), IIIF interactions are particularly susceptible to these limits.The mechanism for determining which of these requests should be allowed or blocked is known as Cross-Origin Resource Sharing, or CORS. A full explanation of CORS is beyond the scope of this project, but the SAM deploy template contains five parameters relating to how the IIIF server handles CORS:\nCorsAllowCredentials contains the value that will be returned in the Access-Control-Allow-Credentials response header.\nCorsAllowHeaders contains the value that will be returned in the Access-Control-Allow-Headers response header.\nCorsAllowOrigin contains the value that will be returned in the Access-Control-Allow-Origin response header. In addition, a special value, REFLECT_ORIGIN, instructs the IIIF server to copy the value of the incoming request's Origin header into the Access-Control-Allow-Origin response header.\nCorsExposeHeaders contains the value that will be returned in the Access-Control-Expose-Headers response header.\nCorsMaxAge contains the value that will be returned in the Access-Control-Max-Age response header.\nThe default values will work in most circumstances, but if you need the IIIF server to accept requests that include credentials or other potentially sensitive information (e.g., Authorization and/or Cookie headers), you'll need to set CorsAllowOrigin to REFLECT_ORIGIN and CorsAllowCredentials to true. Other settings allow further customization."}},"/docs/advanced-usage/request-response-functions":{"title":"Request Response Functions","data":{"requestresponse-functions#Request/Response Functions":"The IIIF service can be heavily customized through the use of CloudFront Functions or Lambda@Edge Functions attached to a CloudFront distribution in front of the service. It's important to understand the four stages of CloudFront processing in order to know where a given type of customization belongs.\nA viewer-request function will be called on every request, cached or not. This is the appropriate place to attach\na function that performs authorization, authentication, or anything else whose result should not be cached.\nAn origin-request function will only be called when CloudFront refreshes the content from the origin (e.g., the IIIF server).\nIt's the appropriate place to attach a function that should be cached, such as S3 file resolution or the retrieval of\nimage dimensions.\nSimilarly, the origin-response and viewer-response functions are called after the IIIF server returns its response\nand before CloudFront passes it on to the viewer, respectively. They can be used to alter the response in a way that is\neither cached or ephemeral.","examples#Examples":"These examples use CloudFront Functions. Lambda@Edge functions are slightly more complicated in terms of the event structure but the basic idea is the same.","simple-authorization#Simple Authorization":"function handler(event) {\n if (notAuthorized) { // based on something in the event.request\n return {\n statusCode: 403,\n statusDescription: 'Unauthorized'\n };\n };\n return event.request;\n}","custom-file-location--image-dimensions#Custom File Location / Image Dimensions":"function handler(event) {\n var request = event.request;\n request.headers['x-preflight-location'] = [{value: 's3://image-bucket/path/to/correct/image.tif'}];\n request.headers['x-preflight-dimensions'] = [{value: JSON.stringify({ width: 640, height: 480 })}];\n return request;\n}\nThe x-preflight-dimensions header can take several shapes:\n{ width, height } (or [{ width, height }]) - a straightforward, single-resolution image\n[{ width, height }, { width, height }, ...] - a multi-resolution image with pages of the specified sizes\n{ width, height, pages } - a multi-resolution image with the specified number of pages, each half the size of the one before\n{ width, height, limit } - a multi-resolution image in which the smallest width and height are both less than the specified limit\nFor example, the following dimension values would all describe the same pyramidal image:\n[{ width: 2048, height: 1536 }, { width: 1024, height: 768 }, { width: 512, height: 384 }]\n{ width: 2048, height: 1536, pages: 3 }\n{ width: 2048, height: 1536, limit: 480 }\nThe limit calculator will keep going until both dimensions are less than the limit, not less than or equal to. So a limit: 512 on the third example above would generate a fourth page at { width: 256, height: 192 }.\nIf you plan to use CloudFront functions to add either of the above x-preflight- headers to incoming requests, you must set the value of the Preflight parameter to true when deploying serverless-iiif. The function will only look for the preflight headers if this environment variable is true. This prevents requests from including those headers directly if no preflight function is present. If you do use a preflight function, make sure it strips out any x-preflight-location and x-preflight-dimensions headers that it doesn't set itself."}},"/docs/communities/iiif":{"title":"Iiif","data":{}},"/docs/communities/samvera":{"title":"Samvera","data":{}},"/docs/contributors":{"title":"Contributors","data":{"":"Michael B. Klein\nJustin Gondron\nRob Kaufman\nEdward Silverton\nTrey Pendragon\nTheia Wolfe"}},"/docs/custom-sharp-layer":{"title":"Custom Sharp Layer","data":{"":"This lambda uses the Sharp layer from https://github.com/samvera-labs/lambda-layer-sharp-jp2/releases in order to get a version of Sharp with jp2 support.You can build your own local version using that code and then deploy your own layer and set that layer in your SAM template."}},"/docs/how-to-contribute":{"title":"How to Contribute?","data":{"":"If you're working on a PR for this project, create a feature branch off of main.This repository follows the Samvera Community Code of Conduct and language recommendations. Please do not create a branch called master for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository."}},"/docs":{"title":"serverless-iiif","data":{"description#Description":"A cost-effective, infinitely scalable IIIF 2.1 and 3.0 image API compliant service packaged as an AWS Serverless Application with minimum setup and no maintenance. Suitable for large institutional collections or small digital humanities projects.","components#Components":"A simple Lambda Function wrapper for the iiif-processor module.\nA Lambda Function URL that is used to invoke the IIIF API via HTTPS.\nA Lambda Layer containing all the dependencies for the Lambda Function.","prerequisites#Prerequisites":"Some basic knowledge of AWS.\nAn Amazon Web Services account with permissions to create resources via the console and/or command line.\nAn Amazon S3 bucket to hold the source images to be served via IIIF.\nNote: The Lambda Function will be granted read access to this bucket.","license#License":"serverless-iiif is available under the Apache 2.0 license."}},"/docs/notes":{"title":"Notes","data":{"":"serverless-iiif takes advantage of AWS Lambda URLs' streaming response functionality to overcome the 6MB response limit that previous versions were subject to. Instead of a hard limit of 6MB, there is now a soft limit of approximately 20MB for each response. This limit can be adjusted by opening a support ticket with AWS requesting a quota increase. In addition, the streaming rate for the first 6MB of each response is uncapped; data over 6MB is capped at 2MB/s."}},"/docs/quick-start/deleting-the-app":{"title":"Deleting the application","data":{"":"If you deployed the application on its own, the easiest way to delete the application is either from the Lambda Applications Console or by deleting its CloudFormation Stack.If you deployed from the command line, you can also use the npm run delete command.If you deployed using an infrastructure tool such as AWS CloudFormation or Terraform, you should use that tool's destroy/teardown functionality to remove the IIIF stack as well."}},"/docs/quick-start/deployment-command-line":{"title":"Deploying via the Command Line","data":{"prerequisites#Prerequisites":"Docker\nAWS CLI\nAWS SAM CLI v1.91 or greater","step-1#Step 1":"Make sure the AWS CLI is properly configured with credentials that have sufficient access to manage IAM, S3, and Lambda resources.","step-2#Step 2":"Clone this repository.","step-3#Step 3":"Copy deploy.yml.example to deploy.yml. Update the various values under parameter_overrides within.","step-4#Step 4":"Build the application:\n$ npm run build","step-5#Step 5":"Deploy the application using one of the following:\n# To be prompted for all configuration values before deploying\n$ npm run deploy-guided\n# To deploy using the current configuration, prompting only for changeset confirmation\n$ npm run deploy\nIf you use the guided deploy, you'll be prompted for various configuration parameters, confirmations, and acknowledgments of specific issues (particularly the creation of IAM resources and the deployment of an open/unauthenticated Lambda Function URL). Otherwise, you'll simply be asked to confirm the calculated changeset.","step-6#Step 6":"Follow the prompts to complete the deployment process and get the resulting endpoint."}},"/docs/quick-start/deployment-sam":{"title":"Deploying via the AWS Serverless Application Repository","data":{"":"serverless-iiif is distributed and deployed via the AWS Serverless Application Repository. To deploy it using the AWS Console:","step-1#Step 1":"Find the serverless-iiif application in the AWS Serverless Application Repository.","step-2#Step 2":"Make sure your currently selected region (in the console's top navigation bar) is the one you want to deploy to.","step-3#Step 3":"Scroll down to the Application settings section.","step-4#Step 4":"Configure the deploy template:\nGive your stack a unique Application name\nEnter the name of the SourceBucket the service will serve images from\nCheck the box acknowledging that the app will create a custom IAM roles and resource policies (and if deploying the Caching version, that it will also deploy a nested application)\nOptional: Enter or change any other parameters that apply to your desired configuration.","step-5#Step 5":"Click Deploy.","step-6#Step 6":"When all the resources are properly created and configured, the new stack should be in the CREATE_COMPLETE stage. If there's an error, it will delete all the resources it created, roll back any changes it made, and eventually reach the ROLLBACK_COMPLETE stage.","step-7#Step 7":"Click the CloudFormation stack link.","step-8#Step 8":"Click the Outputs tab to see (and copy) the IIIF Endpoint URL."}},"/docs/quick-start":{"title":"Index","data":{"":"serverless-iiif is deployed as a Lambda Function URL, in the lambda-url.AWS_REGION.on.aws domain (e.g., https://fu90293j0pj902j902c32j902.lambda-url.us-east-1.on.aws/iiif/2/). In order to use a custom domain name, or other features like caching and pre/post-processing functions, you'll have to set up a CloudFront distribution."}},"/docs/quick-start/infrastructure":{"title":"Deploying via Infrastructure Tools","data":{"":"You will most likely want to deploy serverless-iiif as part of a larger infrastructure stack. This stack might include a caching layer (AWS CloudFront), functions to customize the services behavior, a custom domain name, and more. This section provides documentation and examples of how to deploy the service using AWS CloudFormation or Terraform."}},"/docs/source-images":{"title":"Source Images","data":{"":"The S3 key of any given file, minus the extension, is its IIIF ID. For example, if you want to access the image manifest for the file at abcdef.tif, you would get https://.../iiif/2/abcdef/info.json. If your key contains slashes, they must be URL-encoded: e.g., ab/cd/ef/gh.tif would be at https://.../iiif/2/ab%2Fcd%2Fef%2Fgh/info.json. (This limitation could easily be fixed by encoding only the necessary slashes in the incoming URL before handing it off to the IIIF processor, but that's beyond the scope of the demo.)iiif-processor can use any image format natively supported by libvips, including JPEG 2000 (.jp2), but best results will come from using tiled, multi-resolution TIFFs. The Lambda Function wrapper included in this application assumes a .tif extension unless you set ResolverTemplate in your .env file.\nSome versions of libvips and libjpeg have an issue with JPEG-compressed pyramidal TIFF images that include more than 3 channels (e.g.,\nalpha channels). If you find that serverless-iiif returns an error for an image request or isn't rendering as you'd expect, try removing any additional channels beyond red, green, and blue.","image-metadata#Image Metadata":"serverless-iiif will probe each source image for its dimensions before any other processing takes place. Because this process can be time consuming, especially for large files, serverless-iiif first looks for fields calls x-amz-meta-width and x-amz-meta-height in the source file's S3 Object Metadata before trying to load dimensions from the image itself. If those properties are present, they will be used instead.","creating-tiled-tiffs#Creating tiled TIFFs":"","using-the-vips-command-line#Using the VIPS command line":"# For a 3-channel source image\nvips tiffsave source_image.tif output_image.tif --tile --pyramid --compression jpeg --tile-width 256 --tile-height 256\n# For a source image with an alpha channel\nvips extract_band source_image.tif temp_image.v 0 --n 3 \\\n && vips tiffsave temp_image.v output_image.tif --tile --pyramid --compression jpeg --tile-width 256 --tile-height 256 \\\n && rm temp_image.v","using-imagemagick#Using ImageMagick":"convert source_image.tif -alpha off -define tiff:tile-geometry=256x256 -compress jpeg 'ptif:output_image.tif'"}},"/docs/testing":{"title":"Testing","data":{"testing#Testing":"If tests are run locally they will start in \"watch\" mode. If a CI environment is detected they will only run once. From the project root run:\nnpm test\nTo generate a code coverage report run:\nnpm test --coverage"}},"/":{"title":"Serverless IIIF – Serve images via IIIF","data":{}},"/docs/quick-start/infrastructure/cloudformation":{"title":"Cloudformation","data":{"":"Installing serverless-iiif as part of a CloudFormation template makes it easy to integrate the service with other components. Please refer to the example and the CloudFormation documentation for more information on how you might tailor these templates to your own needs and deploy them to AWS.","syntax#Syntax":"To declare this entity in your AWS CloudFormation template, use the following syntax:","properties#Properties":"","example#Example":"This example template will deploy a full application stack consisting of:\nA serverless-iiif image server\nA CloudFront distribution with a custom hostname and SSL certificate"}},"/docs/quick-start/infrastructure/terraform":{"title":"Terraform","data":{"":"The serverless-iiif GitHub repository includes a that can be used as a drop-in component in any\nTerraform manifest. Please refer to the documentation and examples below, as well as the Terraform documentation\nfor more information on how you might use these tools to deploy your own custom stack to AWS.","undefined#Required Inputs":"These variables must be set in the module block when using this module.","undefined#Optional Inputs":"These variables have default values and don't have to be set to use this module. You may set these variables to override their default\nvalues.","undefined#Minimal Example":"module \"serverless_iiif\" {\n source = \"github.com/samvera/serverless-iiif//extras/terraform\"\n source_bucket = \"iiif-images\"\n stack_name = \"my-iiif-service\"\n}","undefined#(Almost) Full Example":"module \"serverless_iiif\" {\n source = \"github.com/samvera/serverless-iiif//extras/terraform\"\n source_bucket = \"iiif-images\"\n stack_name = \"my-iiif-service\"\n cors_allow_credentials = true\n cors_allow_headers = \"X-Custom-Header,Upgrade-Insecure-Requests\"\n cors_allow_origin = \"REFLECT_ORIGIN\"\n cors_expose_headers = \"Content-Encoding\"\n cors_max_age = 600\n force_host = \"iiif.my-domain.edu\"\n iiif_lambda_memory = 2048\n iiif_lambda_timeout = 120\n pixel_density = 600\n preflight = true\n resolver_template = \"iiif/%s.tif\"\n tags = {\n Project = \"my-image-service\"\n }\n}"}}} \ No newline at end of file +{"/about":{"title":"About","data":{"iiif-in-the-cloud#IIIF in the Cloud":"Access is bursty by nature\nTile requests are at least an order of magnitude burstier\nVery hard to scale a server-based solution in a way that can handle the bursts without wasting capacity (and money)","solution#Solution":"","under-the-hood#Under the Hood":"","libvips#libvips":"“A demand-driven, horizontally threaded image processing library”\nVery fast and extremely lightweight\nCan perform more than 300 different image manipulation operations\nSupports a large number of image formats\nMost importantly (for our purposes), it supports multi-resolution images\nand tiling\nDocumentation ↗","sharp#sharp":"Fast native Node.js wrapper for libvips\nSupports seeking and streaming of image data without making a local copy\nDocumentation ↗","contributors#Contributors":"Michael B. Klein - Northwestern University Libraries\nJustin Gondron\nRob Kaufman - Notch 8\nEdward Silverton - Mnemoscene\nTrey Pendragon - Princeton University Libraries\nTheia Wolfe","license#License":"Serverless IIIF is available under the Apache 2.0 license."}},"/docs/advanced-usage/cors":{"title":"Cross-Origin Request Sharing (CORS)","data":{"":"For security reasons, web browsers have built in limits on what sort of requests can be made to a given domain from a page hosted under a different domain. Since this is a common use case for IIIF (resources embedded in pages whose domains differ from that of the server), IIIF interactions are particularly susceptible to these limits.The mechanism for determining which of these requests should be allowed or blocked is known as Cross-Origin Resource Sharing, or CORS. A full explanation of CORS is beyond the scope of this project, but the SAM deploy template contains five parameters relating to how the IIIF server handles CORS:\nCorsAllowCredentials contains the value that will be returned in the Access-Control-Allow-Credentials response header.\nCorsAllowHeaders contains the value that will be returned in the Access-Control-Allow-Headers response header.\nCorsAllowOrigin contains the value that will be returned in the Access-Control-Allow-Origin response header. In addition, a special value, REFLECT_ORIGIN, instructs the IIIF server to copy the value of the incoming request's Origin header into the Access-Control-Allow-Origin response header.\nCorsExposeHeaders contains the value that will be returned in the Access-Control-Expose-Headers response header.\nCorsMaxAge contains the value that will be returned in the Access-Control-Max-Age response header.\nThe default values will work in most circumstances, but if you need the IIIF server to accept requests that include credentials or other potentially sensitive information (e.g., Authorization and/or Cookie headers), you'll need to set CorsAllowOrigin to REFLECT_ORIGIN and CorsAllowCredentials to true. Other settings allow further customization."}},"/docs/advanced-usage/request-response-functions":{"title":"Request Response Functions","data":{"requestresponse-functions#Request/Response Functions":"The IIIF service can be heavily customized through the use of CloudFront Functions or Lambda@Edge Functions attached to a CloudFront distribution in front of the service. It's important to understand the four stages of CloudFront processing in order to know where a given type of customization belongs.\nA viewer-request function will be called on every request, cached or not. This is the appropriate place to attach\na function that performs authorization, authentication, or anything else whose result should not be cached.\nAn origin-request function will only be called when CloudFront refreshes the content from the origin (e.g., the IIIF server).\nIt's the appropriate place to attach a function that should be cached, such as S3 file resolution or the retrieval of\nimage dimensions.\nSimilarly, the origin-response and viewer-response functions are called after the IIIF server returns its response\nand before CloudFront passes it on to the viewer, respectively. They can be used to alter the response in a way that is\neither cached or ephemeral.","examples#Examples":"These examples use CloudFront Functions. Lambda@Edge functions are slightly more complicated in terms of the event structure but the basic idea is the same.","simple-authorization#Simple Authorization":"function handler(event) {\n if (notAuthorized) { // based on something in the event.request\n return {\n statusCode: 403,\n statusDescription: 'Unauthorized'\n };\n };\n return event.request;\n}","custom-file-location--image-dimensions#Custom File Location / Image Dimensions":"function handler(event) {\n var request = event.request;\n request.headers['x-preflight-location'] = [{value: 's3://image-bucket/path/to/correct/image.tif'}];\n request.headers['x-preflight-dimensions'] = [{value: JSON.stringify({ width: 640, height: 480 })}];\n return request;\n}\nThe x-preflight-dimensions header can take several shapes:\n{ width, height } (or [{ width, height }]) - a straightforward, single-resolution image\n[{ width, height }, { width, height }, ...] - a multi-resolution image with pages of the specified sizes\n{ width, height, pages } - a multi-resolution image with the specified number of pages, each half the size of the one before\n{ width, height, limit } - a multi-resolution image in which the smallest width and height are both less than the specified limit\nFor example, the following dimension values would all describe the same pyramidal image:\n[{ width: 2048, height: 1536 }, { width: 1024, height: 768 }, { width: 512, height: 384 }]\n{ width: 2048, height: 1536, pages: 3 }\n{ width: 2048, height: 1536, limit: 480 }\nThe limit calculator will keep going until both dimensions are less than the limit, not less than or equal to. So a limit: 512 on the third example above would generate a fourth page at { width: 256, height: 192 }.\nIf you plan to use CloudFront functions to add either of the above x-preflight- headers to incoming requests, you must set the value of the Preflight parameter to true when deploying serverless-iiif. The function will only look for the preflight headers if this environment variable is true. This prevents requests from including those headers directly if no preflight function is present. If you do use a preflight function, make sure it strips out any x-preflight-location and x-preflight-dimensions headers that it doesn't set itself."}},"/docs/communities/iiif":{"title":"Iiif","data":{}},"/docs/communities/samvera":{"title":"Samvera","data":{}},"/docs/contributors":{"title":"Contributors","data":{"":"Michael B. Klein\nJustin Gondron\nRob Kaufman\nEdward Silverton\nTrey Pendragon\nTheia Wolfe"}},"/docs/custom-sharp-layer":{"title":"Custom Sharp Layer","data":{"":"This lambda uses the Sharp layer from https://github.com/samvera-labs/sharp-jp2-lambda-layer in order to get a version of Sharp with jp2 support.You can build your own local version using that code and then deploy your own layer and set that layer in your SAM template."}},"/docs/how-to-contribute":{"title":"How to Contribute?","data":{"":"If you're working on a PR for this project, create a feature branch off of main.This repository follows the Samvera Community Code of Conduct and language recommendations. Please do not create a branch called master for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository."}},"/docs":{"title":"serverless-iiif","data":{"description#Description":"A cost-effective, infinitely scalable IIIF 2.1 and 3.0 image API compliant service packaged as an AWS Serverless Application with minimum setup and no maintenance. Suitable for large institutional collections or small digital humanities projects.","components#Components":"A simple Lambda Function wrapper for the iiif-processor module.\nA Lambda Function URL that is used to invoke the IIIF API via HTTPS.\nA Lambda Layer containing all the dependencies for the Lambda Function.","prerequisites#Prerequisites":"Some basic knowledge of AWS.\nAn Amazon Web Services account with permissions to create resources via the console and/or command line.\nAn Amazon S3 bucket to hold the source images to be served via IIIF.\nNote: The Lambda Function will be granted read access to this bucket.","license#License":"serverless-iiif is available under the Apache 2.0 license."}},"/docs/notes":{"title":"Notes","data":{"":"serverless-iiif takes advantage of AWS Lambda URLs' streaming response functionality to overcome the 6MB response limit that previous versions were subject to. Instead of a hard limit of 6MB, there is now a soft limit of approximately 20MB for each response. This limit can be adjusted by opening a support ticket with AWS requesting a quota increase. In addition, the streaming rate for the first 6MB of each response is uncapped; data over 6MB is capped at 2MB/s."}},"/docs/quick-start/deleting-the-app":{"title":"Deleting the application","data":{"":"If you deployed the application on its own, the easiest way to delete the application is either from the Lambda Applications Console or by deleting its CloudFormation Stack.If you deployed from the command line, you can also use the npm run delete command.If you deployed using an infrastructure tool such as AWS CloudFormation or Terraform, you should use that tool's destroy/teardown functionality to remove the IIIF stack as well."}},"/docs/quick-start/deployment-command-line":{"title":"Deploying via the Command Line","data":{"prerequisites#Prerequisites":"Docker\nAWS CLI\nAWS SAM CLI v1.91 or greater","step-1#Step 1":"Make sure the AWS CLI is properly configured with credentials that have sufficient access to manage IAM, S3, and Lambda resources.","step-2#Step 2":"Clone this repository.","step-3#Step 3":"Copy deploy.yml.example to deploy.yml. Update the various values under parameter_overrides within.","step-4#Step 4":"Build the application:\n$ npm run build","step-5#Step 5":"Deploy the application using one of the following:\n# To be prompted for all configuration values before deploying\n$ npm run deploy-guided\n# To deploy using the current configuration, prompting only for changeset confirmation\n$ npm run deploy\nIf you use the guided deploy, you'll be prompted for various configuration parameters, confirmations, and acknowledgments of specific issues (particularly the creation of IAM resources and the deployment of an open/unauthenticated Lambda Function URL). Otherwise, you'll simply be asked to confirm the calculated changeset.","step-6#Step 6":"Follow the prompts to complete the deployment process and get the resulting endpoint."}},"/docs/quick-start/deployment-sam":{"title":"Deploying via the AWS Serverless Application Repository","data":{"":"serverless-iiif is distributed and deployed via the AWS Serverless Application Repository. To deploy it using the AWS Console:","step-1#Step 1":"Find the serverless-iiif application in the AWS Serverless Application Repository.","step-2#Step 2":"Make sure your currently selected region (in the console's top navigation bar) is the one you want to deploy to.","step-3#Step 3":"Scroll down to the Application settings section.","step-4#Step 4":"Configure the deploy template:\nGive your stack a unique Application name\nEnter the name of the SourceBucket the service will serve images from\nCheck the box acknowledging that the app will create a custom IAM roles and resource policies (and if deploying the Caching version, that it will also deploy a nested application)\nOptional: Enter or change any other parameters that apply to your desired configuration.","step-5#Step 5":"Click Deploy.","step-6#Step 6":"When all the resources are properly created and configured, the new stack should be in the CREATE_COMPLETE stage. If there's an error, it will delete all the resources it created, roll back any changes it made, and eventually reach the ROLLBACK_COMPLETE stage.","step-7#Step 7":"Click the CloudFormation stack link.","step-8#Step 8":"Click the Outputs tab to see (and copy) the IIIF Endpoint URL."}},"/docs/quick-start":{"title":"Index","data":{"":"serverless-iiif is deployed as a Lambda Function URL, in the lambda-url.AWS_REGION.on.aws domain (e.g., https://fu90293j0pj902j902c32j902.lambda-url.us-east-1.on.aws/iiif/2/). In order to use a custom domain name, or other features like caching and pre/post-processing functions, you'll have to set up a CloudFront distribution."}},"/docs/quick-start/infrastructure":{"title":"Deploying via Infrastructure Tools","data":{"":"You will most likely want to deploy serverless-iiif as part of a larger infrastructure stack. This stack might include a caching layer (AWS CloudFront), functions to customize the services behavior, a custom domain name, and more. This section provides documentation and examples of how to deploy the service using AWS CloudFormation or Terraform."}},"/docs/source-images":{"title":"Source Images","data":{"":"The S3 key of any given file, minus the extension, is its IIIF ID. For example, if you want to access the image manifest for the file at abcdef.tif, you would get https://.../iiif/2/abcdef/info.json. If your key contains slashes, they must be URL-encoded: e.g., ab/cd/ef/gh.tif would be at https://.../iiif/2/ab%2Fcd%2Fef%2Fgh/info.json. (This limitation could easily be fixed by encoding only the necessary slashes in the incoming URL before handing it off to the IIIF processor, but that's beyond the scope of the demo.)iiif-processor can use any image format natively supported by libvips, including JPEG 2000 (.jp2), but best results will come from using tiled, multi-resolution TIFFs. The Lambda Function wrapper included in this application assumes a .tif extension unless you set ResolverTemplate in your .env file.\nSome versions of libvips and libjpeg have an issue with JPEG-compressed pyramidal TIFF images that include more than 3 channels (e.g.,\nalpha channels). If you find that serverless-iiif returns an error for an image request or isn't rendering as you'd expect, try removing any additional channels beyond red, green, and blue.","image-metadata#Image Metadata":"serverless-iiif will probe each source image for its dimensions before any other processing takes place. Because this process can be time consuming, especially for large files, serverless-iiif first looks for fields calls x-amz-meta-width and x-amz-meta-height in the source file's S3 Object Metadata before trying to load dimensions from the image itself. If those properties are present, they will be used instead.","creating-tiled-tiffs#Creating tiled TIFFs":"","using-the-vips-command-line#Using the VIPS command line":"# For a 3-channel source image\nvips tiffsave source_image.tif output_image.tif --tile --pyramid --compression jpeg --tile-width 256 --tile-height 256\n# For a source image with an alpha channel\nvips extract_band source_image.tif temp_image.v 0 --n 3 \\\n && vips tiffsave temp_image.v output_image.tif --tile --pyramid --compression jpeg --tile-width 256 --tile-height 256 \\\n && rm temp_image.v","using-imagemagick#Using ImageMagick":"convert source_image.tif -alpha off -define tiff:tile-geometry=256x256 -compress jpeg 'ptif:output_image.tif'"}},"/docs/testing":{"title":"Testing","data":{"testing#Testing":"If tests are run locally they will start in \"watch\" mode. If a CI environment is detected they will only run once. From the project root run:\nnpm test\nTo generate a code coverage report run:\nnpm test --coverage"}},"/":{"title":"Serverless IIIF – Serve images via IIIF","data":{}},"/docs/quick-start/infrastructure/terraform":{"title":"Terraform","data":{"":"The serverless-iiif GitHub repository includes a that can be used as a drop-in component in any\nTerraform manifest. Please refer to the documentation and examples below, as well as the Terraform documentation\nfor more information on how you might use these tools to deploy your own custom stack to AWS.","undefined#Required Inputs":"These variables must be set in the module block when using this module.","undefined#Optional Inputs":"These variables have default values and don't have to be set to use this module. You may set these variables to override their default\nvalues.","undefined#Minimal Example":"module \"serverless_iiif\" {\n source = \"github.com/samvera/serverless-iiif//extras/terraform\"\n source_bucket = \"iiif-images\"\n stack_name = \"my-iiif-service\"\n}","undefined#(Almost) Full Example":"module \"serverless_iiif\" {\n source = \"github.com/samvera/serverless-iiif//extras/terraform\"\n source_bucket = \"iiif-images\"\n stack_name = \"my-iiif-service\"\n cors_allow_credentials = true\n cors_allow_headers = \"X-Custom-Header,Upgrade-Insecure-Requests\"\n cors_allow_origin = \"REFLECT_ORIGIN\"\n cors_expose_headers = \"Content-Encoding\"\n cors_max_age = 600\n force_host = \"iiif.my-domain.edu\"\n iiif_lambda_memory = 2048\n iiif_lambda_timeout = 120\n pixel_density = 600\n preflight = true\n resolver_template = \"iiif/%s.tif\"\n tags = {\n Project = \"my-image-service\"\n }\n}"}},"/docs/quick-start/infrastructure/cloudformation":{"title":"Cloudformation","data":{"":"Installing serverless-iiif as part of a CloudFormation template makes it easy to integrate the service with other components. Please refer to the example and the CloudFormation documentation for more information on how you might tailor these templates to your own needs and deploy them to AWS.","syntax#Syntax":"To declare this entity in your AWS CloudFormation template, use the following syntax:","properties#Properties":"","example#Example":"This example template will deploy a full application stack consisting of:\nA serverless-iiif image server\nA CloudFront distribution with a custom hostname and SSL certificate"}}} \ No newline at end of file diff --git a/_next/static/chunks/pages/docs/custom-sharp-layer-1b87a5d81904c822.js b/_next/static/chunks/pages/docs/custom-sharp-layer-1b87a5d81904c822.js deleted file mode 100644 index ad08cec..0000000 --- a/_next/static/chunks/pages/docs/custom-sharp-layer-1b87a5d81904c822.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[660],{1794:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/custom-sharp-layer",function(){return a(3663)}])},3663:function(e,t,a){"use strict";a.r(t),a.d(t,{__toc:function(){return c}});var s=a(5893),r=a(6997),i=a(3994),n=a(5131);a(7954);var o=a(9575);let c=[];function d(e){let t=Object.assign({h1:"h1",p:"p",a:"a"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{children:"Custom Sharp Layer"}),"\n",(0,s.jsxs)(t.p,{children:["This lambda uses the Sharp layer from ",(0,s.jsx)(t.a,{href:"https://github.com/samvera-labs/lambda-layer-sharp-jp2/releases",children:"https://github.com/samvera-labs/lambda-layer-sharp-jp2/releases"})," in order to get a version of Sharp with jp2 support."]}),"\n",(0,s.jsx)(t.p,{children:"You can build your own local version using that code and then deploy your own layer and set that layer in your SAM template."})]})}let l={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,o.a)(),e.components);return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"pages/docs/custom-sharp-layer.mdx",route:"/docs/custom-sharp-layer",pageMap:[{kind:"Meta",data:{index:{type:"page",title:"Serverless IIIF",display:"hidden",theme:{layout:"raw"}},docs:{type:"page",title:"Documentation"},about:{type:"page",title:"About",theme:{typesetting:"article"}},contact:{title:"IIIF Image API ↗",type:"page",href:"https://iiif.io/api/image/2.1/",newWindow:!0}}},{kind:"MdxPage",name:"about",route:"/about"},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{index:"Introduction","quick-start":"Quick Start","source-images":"Source Images","custom-sharp-layer":"Custom Sharp Layer","advanced-usage":"Advanced Usage",testing:"Testing",notes:"Notes","-- Contributing":{type:"separator",title:"Contributing"},"how-to-contribute":"Guide",contributors:"Contributors",communities:"Communities"}},{kind:"Folder",name:"advanced-usage",route:"/docs/advanced-usage",children:[{kind:"Meta",data:{cors:"Cross-Origin Request Sharing (CORS)","request-response-functions":"Request Response Functions"}},{kind:"MdxPage",name:"cors",route:"/docs/advanced-usage/cors"},{kind:"MdxPage",name:"request-response-functions",route:"/docs/advanced-usage/request-response-functions"}]},{kind:"Folder",name:"communities",route:"/docs/communities",children:[{kind:"MdxPage",name:"iiif",route:"/docs/communities/iiif"},{kind:"MdxPage",name:"samvera",route:"/docs/communities/samvera"},{kind:"Meta",data:{iiif:"Iiif",samvera:"Samvera"}}]},{kind:"MdxPage",name:"contributors",route:"/docs/contributors"},{kind:"MdxPage",name:"custom-sharp-layer",route:"/docs/custom-sharp-layer"},{kind:"MdxPage",name:"how-to-contribute",route:"/docs/how-to-contribute"},{kind:"MdxPage",name:"index",route:"/docs"},{kind:"MdxPage",name:"notes",route:"/docs/notes"},{kind:"Folder",name:"quick-start",route:"/docs/quick-start",children:[{kind:"Meta",data:{index:"Options","deployment-sam":"Deploying via the AWS Serverless Application Repository","deployment-command-line":"Deploying via the Command Line",infrastructure:"Deploying via Infrastructure Tools","deleting-the-app":"Deleting the App"}},{kind:"MdxPage",name:"deleting-the-app",route:"/docs/quick-start/deleting-the-app"},{kind:"MdxPage",name:"deployment-command-line",route:"/docs/quick-start/deployment-command-line"},{kind:"MdxPage",name:"deployment-sam",route:"/docs/quick-start/deployment-sam"},{kind:"MdxPage",name:"index",route:"/docs/quick-start"},{kind:"Folder",name:"infrastructure",route:"/docs/quick-start/infrastructure",children:[{kind:"Meta",data:{index:"Introduction",cloudformation:"AWS CloudFormation",terraform:"Terraform"}},{kind:"MdxPage",name:"cloudformation",route:"/docs/quick-start/infrastructure/cloudformation"},{kind:"MdxPage",name:"index",route:"/docs/quick-start/infrastructure"},{kind:"MdxPage",name:"terraform",route:"/docs/quick-start/infrastructure/terraform"}]}]},{kind:"MdxPage",name:"source-images",route:"/docs/source-images"},{kind:"MdxPage",name:"testing",route:"/docs/testing"}]},{kind:"MdxPage",name:"index",route:"/",frontMatter:{title:"Serverless IIIF – Serve images via IIIF"}}],flexsearch:{codeblocks:!0},title:"Custom Sharp Layer",headings:c},pageNextRoute:"/docs/custom-sharp-layer",nextraLayout:i.ZP,themeConfig:n.Z};t.default=(0,r.j)(l)},5131:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var s=a(5893),r=a(9554),i=a.n(r),n=a(1163),o={footer:{text:(0,s.jsxs)("span",{children:["MIT ",new Date().getFullYear()," \xa9 ",(0,s.jsx)("a",{href:"#",children:"Serverless IIIF"}),"."]})},head:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("meta",{property:"og:title",content:"Serverless IIIF"}),(0,s.jsx)("meta",{property:"og:description",content:"Serve images via IIIF"}),(0,s.jsx)("link",{rel:"shortcut icon",type:"image/png",href:"/favicon.png"})]}),logo:(0,s.jsx)(function(){return(0,s.jsxs)("span",{className:"jsx-6558685ef54f338d",children:[(0,s.jsxs)("svg",{id:"serverless-iiif-logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 635.01 75.82",className:"jsx-6558685ef54f338d",children:[(0,s.jsx)("path",{fill:"currentColor",d:"m23.41,61.94c4.03,0,6.92-.73,8.68-2.18,1.75-1.46,2.63-3.19,2.63-5.21,0-1.87-.69-3.38-2.07-4.54-1.38-1.16-3.42-2.15-6.1-2.97l-5.94-1.9c-4.03-1.34-7.6-2.84-10.7-4.48-3.1-1.64-5.49-3.77-7.17-6.38C1.06,31.66.22,28.34.22,24.3c0-6.2,2.35-11.12,7.06-14.78,4.7-3.66,11.24-5.49,19.6-5.49,4.26,0,8.04.41,11.37,1.23,3.32.82,5.94,2.04,7.84,3.64,1.9,1.61,2.86,3.57,2.86,5.88,0,1.72-.39,3.19-1.18,4.42s-1.77,2.3-2.97,3.19c-1.72-1.19-4-2.22-6.83-3.08-2.84-.86-5.97-1.29-9.41-1.29s-6.27.58-8.06,1.74c-1.79,1.16-2.69,2.67-2.69,4.54,0,1.49.6,2.71,1.79,3.64,1.19.93,2.99,1.77,5.38,2.52l6.16,1.9c6.79,2.09,12.02,4.87,15.68,8.34,3.66,3.47,5.49,8.12,5.49,13.94,0,6.27-2.43,11.37-7.28,15.29-4.85,3.92-11.87,5.88-21.06,5.88-4.56,0-8.62-.49-12.21-1.46-3.58-.97-6.44-2.39-8.57-4.26-2.13-1.87-3.19-4.03-3.19-6.5,0-1.94.58-3.6,1.74-4.98,1.16-1.38,2.44-2.41,3.86-3.08,2.02,1.64,4.54,3.12,7.56,4.42,3.02,1.31,6.44,1.96,10.25,1.96Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m66.98,54.88l-.67-11.2,27.78-4.37c-.15-2.09-1.05-4.03-2.69-5.82-1.64-1.79-4.07-2.69-7.28-2.69s-6.16,1.14-8.4,3.42c-2.24,2.28-3.44,5.51-3.58,9.69l.56,7.73c.67,4.11,2.43,7.04,5.26,8.79,2.84,1.76,6.2,2.63,10.08,2.63,3.14,0,6.08-.45,8.85-1.34,2.76-.9,5-1.83,6.72-2.8,1.12.67,2.03,1.61,2.74,2.8.71,1.2,1.06,2.46,1.06,3.81,0,2.24-.88,4.11-2.63,5.6-1.76,1.49-4.18,2.61-7.28,3.36-3.1.75-6.63,1.12-10.58,1.12-5.75,0-10.92-1.08-15.51-3.25-4.59-2.17-8.2-5.41-10.81-9.74-2.61-4.33-3.92-9.74-3.92-16.24,0-4.78.76-8.92,2.3-12.43,1.53-3.51,3.58-6.4,6.16-8.68,2.58-2.28,5.49-3.98,8.74-5.1,3.25-1.12,6.63-1.68,10.14-1.68,5.15,0,9.65,1.03,13.5,3.08,3.84,2.05,6.85,4.83,9.02,8.34,2.17,3.51,3.25,7.58,3.25,12.21,0,2.32-.64,4.07-1.9,5.26-1.27,1.2-3.02,1.94-5.26,2.24l-35.62,5.26Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m133.17,34.61v14h-16.58v-16.02c0-2.09.5-3.86,1.51-5.32,1.01-1.46,2.41-2.74,4.2-3.86,2.46-1.49,5.43-2.67,8.9-3.53,3.47-.86,7.11-1.29,10.92-1.29,7.62,0,11.42,2.54,11.42,7.62,0,1.2-.17,2.31-.5,3.36-.34,1.05-.73,1.94-1.18,2.69-.75-.15-1.66-.28-2.74-.39-1.08-.11-2.26-.17-3.53-.17-2.24,0-4.48.26-6.72.78-2.24.52-4.14,1.23-5.71,2.13Zm-16.58,9.74l16.58.34v29.12c-.75.22-1.79.43-3.14.62-1.34.19-2.8.28-4.37.28-3.14,0-5.43-.56-6.89-1.68s-2.18-3.14-2.18-6.05v-22.62Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m200.59,19.04c2.31,0,4.24.5,5.77,1.51,1.53,1.01,2.3,2.71,2.3,5.1,0,1.34-.37,3.44-1.12,6.27-.75,2.84-1.74,6.12-2.97,9.86-1.23,3.73-2.6,7.54-4.09,11.42-1.49,3.88-2.99,7.52-4.48,10.92-1.49,3.4-2.84,6.22-4.03,8.46-.82.6-2.13,1.14-3.92,1.62-1.79.48-3.77.73-5.94.73-2.54,0-4.72-.34-6.55-1.01-1.83-.67-3.12-1.72-3.86-3.14-.82-1.57-1.83-3.77-3.02-6.61-1.2-2.84-2.46-6.07-3.81-9.69-1.34-3.62-2.69-7.37-4.03-11.26-1.34-3.88-2.58-7.62-3.7-11.2-1.12-3.58-2.02-6.72-2.69-9.41.97-.97,2.22-1.81,3.75-2.52,1.53-.71,3.19-1.06,4.98-1.06,2.31,0,4.22.49,5.71,1.46,1.49.97,2.58,2.8,3.25,5.49l5.04,17.81c.6,2.09,1.21,4.18,1.85,6.27.63,2.09,1.21,4.03,1.74,5.82.52,1.79.97,3.32,1.34,4.59h.45c1.79-6.05,3.6-12.52,5.43-19.43,1.83-6.91,3.45-13.64,4.87-20.22,2.24-1.19,4.82-1.79,7.73-1.79Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m222.54,54.88l-.67-11.2,27.78-4.37c-.15-2.09-1.05-4.03-2.69-5.82-1.64-1.79-4.07-2.69-7.28-2.69s-6.16,1.14-8.4,3.42c-2.24,2.28-3.44,5.51-3.58,9.69l.56,7.73c.67,4.11,2.43,7.04,5.26,8.79,2.84,1.76,6.2,2.63,10.08,2.63,3.14,0,6.08-.45,8.85-1.34,2.76-.9,5-1.83,6.72-2.8,1.12.67,2.03,1.61,2.74,2.8.71,1.2,1.06,2.46,1.06,3.81,0,2.24-.88,4.11-2.63,5.6-1.76,1.49-4.18,2.61-7.28,3.36-3.1.75-6.63,1.12-10.58,1.12-5.75,0-10.92-1.08-15.51-3.25-4.59-2.17-8.2-5.41-10.81-9.74-2.61-4.33-3.92-9.74-3.92-16.24,0-4.78.76-8.92,2.3-12.43,1.53-3.51,3.58-6.4,6.16-8.68,2.58-2.28,5.49-3.98,8.74-5.1,3.25-1.12,6.63-1.68,10.14-1.68,5.15,0,9.65,1.03,13.5,3.08,3.84,2.05,6.85,4.83,9.02,8.34,2.17,3.51,3.25,7.58,3.25,12.21,0,2.32-.64,4.07-1.9,5.26-1.27,1.2-3.02,1.94-5.26,2.24l-35.62,5.26Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m288.73,34.61v14h-16.58v-16.02c0-2.09.5-3.86,1.51-5.32,1.01-1.46,2.41-2.74,4.2-3.86,2.46-1.49,5.43-2.67,8.9-3.53,3.47-.86,7.11-1.29,10.92-1.29,7.62,0,11.42,2.54,11.42,7.62,0,1.2-.17,2.31-.5,3.36-.34,1.05-.73,1.94-1.18,2.69-.75-.15-1.66-.28-2.74-.39-1.08-.11-2.26-.17-3.53-.17-2.24,0-4.48.26-6.72.78-2.24.52-4.14,1.23-5.71,2.13Zm-16.58,9.74l16.58.34v29.12c-.75.22-1.79.43-3.14.62-1.34.19-2.8.28-4.37.28-3.14,0-5.43-.56-6.89-1.68s-2.18-3.14-2.18-6.05v-22.62Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m331.29,53.31l-16.69-.34V1.01c.75-.22,1.79-.45,3.14-.67,1.34-.22,2.8-.34,4.37-.34,3.21,0,5.54.56,7,1.68,1.46,1.12,2.18,3.17,2.18,6.16v45.47Zm-16.69-8.96l16.69.34v29.12c-.75.22-1.79.43-3.14.62-1.34.19-2.8.28-4.37.28-3.14,0-5.45-.56-6.94-1.68-1.49-1.12-2.24-3.14-2.24-6.05v-22.62Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m349.21,54.88l-.67-11.2,27.78-4.37c-.15-2.09-1.05-4.03-2.69-5.82-1.64-1.79-4.07-2.69-7.28-2.69s-6.16,1.14-8.4,3.42c-2.24,2.28-3.44,5.51-3.58,9.69l.56,7.73c.67,4.11,2.43,7.04,5.26,8.79,2.84,1.76,6.2,2.63,10.08,2.63,3.14,0,6.08-.45,8.85-1.34,2.76-.9,5-1.83,6.72-2.8,1.12.67,2.03,1.61,2.74,2.8.71,1.2,1.06,2.46,1.06,3.81,0,2.24-.88,4.11-2.63,5.6-1.76,1.49-4.18,2.61-7.28,3.36-3.1.75-6.63,1.12-10.58,1.12-5.75,0-10.92-1.08-15.51-3.25-4.59-2.17-8.2-5.41-10.81-9.74-2.61-4.33-3.92-9.74-3.92-16.24,0-4.78.76-8.92,2.3-12.43,1.53-3.51,3.58-6.4,6.16-8.68,2.58-2.28,5.49-3.98,8.74-5.1,3.25-1.12,6.62-1.68,10.14-1.68,5.15,0,9.65,1.03,13.5,3.08,3.84,2.05,6.85,4.83,9.02,8.34,2.17,3.51,3.25,7.58,3.25,12.21,0,2.32-.63,4.07-1.9,5.26-1.27,1.2-3.02,1.94-5.26,2.24l-35.62,5.26Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m442.39,58.24c0,5.45-2.05,9.73-6.16,12.82-4.11,3.1-10.08,4.65-17.92,4.65-6.12,0-11.16-.9-15.12-2.69-3.96-1.79-5.94-4.44-5.94-7.95,0-1.57.34-2.93,1.01-4.09.67-1.16,1.53-2.07,2.58-2.74,2.09,1.2,4.54,2.3,7.34,3.3,2.8,1.01,5.99,1.51,9.58,1.51,5.45,0,8.18-1.57,8.18-4.7,0-1.34-.49-2.41-1.46-3.19-.97-.78-2.58-1.36-4.82-1.74l-4.7-1.12c-5.97-1.27-10.44-3.23-13.38-5.88-2.95-2.65-4.42-6.29-4.42-10.92,0-5.23,2.11-9.39,6.33-12.49,4.22-3.1,9.91-4.65,17.08-4.65,3.58,0,6.85.35,9.8,1.06,2.95.71,5.28,1.79,7,3.25,1.72,1.46,2.58,3.27,2.58,5.43,0,1.49-.3,2.8-.9,3.92-.6,1.12-1.38,2.05-2.35,2.8-.82-.52-2.07-1.08-3.75-1.68-1.68-.6-3.51-1.08-5.49-1.46-1.98-.37-3.83-.56-5.54-.56-2.69,0-4.78.36-6.27,1.06-1.49.71-2.24,1.81-2.24,3.3,0,.97.43,1.81,1.29,2.52.86.71,2.37,1.29,4.54,1.74l4.48,1.12c6.64,1.49,11.42,3.64,14.34,6.44,2.91,2.8,4.37,6.44,4.37,10.92Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m493.35,58.1c0,5.5-2.07,9.81-6.21,12.94-4.14,3.12-10.17,4.69-18.08,4.69-6.18,0-11.26-.9-15.25-2.71-3.99-1.81-5.99-4.48-5.99-8.02,0-1.58.34-2.96,1.02-4.12.68-1.17,1.54-2.09,2.6-2.77,2.11,1.21,4.58,2.32,7.4,3.33,2.83,1.02,6.05,1.53,9.66,1.53,5.5,0,8.25-1.58,8.25-4.75,0-1.36-.49-2.43-1.47-3.22-.98-.79-2.6-1.37-4.86-1.75l-4.75-1.13c-6.03-1.28-10.53-3.26-13.5-5.93-2.98-2.67-4.46-6.35-4.46-11.02,0-5.27,2.13-9.47,6.38-12.6,4.26-3.13,10-4.69,17.23-4.69,3.62,0,6.91.36,9.89,1.07,2.98.72,5.33,1.81,7.06,3.28,1.73,1.47,2.6,3.3,2.6,5.48,0,1.51-.3,2.82-.9,3.95-.6,1.13-1.39,2.07-2.37,2.83-.83-.53-2.09-1.09-3.79-1.69-1.7-.6-3.54-1.09-5.54-1.47-2-.38-3.86-.56-5.59-.56-2.71,0-4.82.36-6.33,1.07-1.51.72-2.26,1.83-2.26,3.33,0,.98.43,1.83,1.3,2.54.86.72,2.39,1.3,4.58,1.75l4.52,1.13c6.7,1.51,11.53,3.67,14.46,6.5,2.94,2.82,4.41,6.5,4.41,11.02Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m523.12,40.77h-9.07V6.05c.37-.15.95-.32,1.74-.5.78-.19,1.62-.28,2.52-.28,1.64,0,2.86.32,3.64.95.78.64,1.18,1.7,1.18,3.19v31.36Zm-9.07-7.5h9.07v40.43c-.38.15-.93.32-1.68.5-.75.19-1.57.28-2.46.28-1.64,0-2.88-.34-3.7-1.01-.82-.67-1.23-1.72-1.23-3.14v-37.07Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m549.11,40.77h-9.07V6.05c.37-.15.95-.32,1.74-.5.78-.19,1.62-.28,2.52-.28,1.64,0,2.86.32,3.64.95.78.64,1.18,1.7,1.18,3.19v31.36Zm-9.07-7.5h9.07v40.43c-.38.15-.93.32-1.68.5-.75.19-1.57.28-2.46.28-1.64,0-2.88-.34-3.7-1.01-.82-.67-1.23-1.72-1.23-3.14v-37.07Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m575.09,40.77h-9.07V6.05c.37-.15.95-.32,1.74-.5.78-.19,1.62-.28,2.52-.28,1.64,0,2.86.32,3.64.95.78.64,1.18,1.7,1.18,3.19v31.36Zm-9.07-7.5h9.07v40.43c-.38.15-.93.32-1.68.5-.75.19-1.57.28-2.46.28-1.64,0-2.88-.34-3.7-1.01-.82-.67-1.23-1.72-1.23-3.14v-37.07Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m600.96,46.37l-9.07-.11V10.75c0-1.49.45-2.69,1.34-3.58.9-.9,2.09-1.34,3.58-1.34.82,0,1.64.11,2.46.34.82.22,1.38.41,1.68.56v39.65Zm-9.07-12.32h9.18v39.76c-.38.08-.95.2-1.74.39-.78.19-1.59.28-2.41.28-1.64,0-2.89-.34-3.75-1.01-.86-.67-1.29-1.68-1.29-3.02v-36.4Zm4.93-20.5v-7.73h37.18c.22.3.45.78.67,1.46.22.67.34,1.38.34,2.13,0,1.2-.3,2.18-.9,2.97-.6.78-1.46,1.18-2.58,1.18h-34.72Zm0,31.02v-7.73h33.26c.22.37.45.88.67,1.51.22.64.34,1.33.34,2.07,0,1.19-.3,2.18-.9,2.97-.6.78-1.46,1.18-2.58,1.18h-30.8Z",className:"jsx-6558685ef54f338d"})]}),(0,s.jsx)(i(),{id:"6558685ef54f338d",children:"svg.jsx-6558685ef54f338d{height:1rem}span.jsx-6558685ef54f338d{padding:.5rem .5rem .5rem 0;-webkit-mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-moz-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-o-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:linear-gradient(60deg,black 25%,rgba(0,0,0,.2)50%,black 75%);-webkit-mask-size:400%;mask-size:400%;-webkit-mask-position:0%;mask-position:0%}span.jsx-6558685ef54f338d:hover{-webkit-mask-position:100%;mask-position:100%;-webkit-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-moz-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-o-transition:mask-position 1s ease,-webkit-mask-position 1s ease;transition:mask-position 1s ease,-webkit-mask-position 1s ease}"})]})},{}),primaryHue:209,project:{link:"https://github.com/samvera/serverless-iiif"},sidebar:{autoCollapse:!0,defaultMenuCollapseLevel:1},useNextSeoProps(){let{asPath:e}=(0,n.useRouter)();if("/"!==e)return{titleTemplate:"%s – Serverless IIIF"}}}}},function(e){e.O(0,[476,888,774,179],function(){return e(e.s=1794)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/docs/custom-sharp-layer-7ca61df03454b1d4.js b/_next/static/chunks/pages/docs/custom-sharp-layer-7ca61df03454b1d4.js new file mode 100644 index 0000000..d54f662 --- /dev/null +++ b/_next/static/chunks/pages/docs/custom-sharp-layer-7ca61df03454b1d4.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[660],{1794:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/custom-sharp-layer",function(){return a(3663)}])},3663:function(e,t,a){"use strict";a.r(t),a.d(t,{__toc:function(){return c}});var s=a(5893),r=a(6997),i=a(3994),n=a(5131);a(7954);var o=a(9575);let c=[];function d(e){let t=Object.assign({h1:"h1",p:"p",a:"a"},(0,o.a)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{children:"Custom Sharp Layer"}),"\n",(0,s.jsxs)(t.p,{children:["This lambda uses the Sharp layer from ",(0,s.jsx)(t.a,{href:"https://github.com/samvera-labs/sharp-jp2-lambda-layer",children:"https://github.com/samvera-labs/sharp-jp2-lambda-layer"})," in order to get a version of Sharp with jp2 support."]}),"\n",(0,s.jsx)(t.p,{children:"You can build your own local version using that code and then deploy your own layer and set that layer in your SAM template."})]})}let l={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,o.a)(),e.components);return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)},pageOpts:{filePath:"pages/docs/custom-sharp-layer.mdx",route:"/docs/custom-sharp-layer",pageMap:[{kind:"Meta",data:{index:{type:"page",title:"Serverless IIIF",display:"hidden",theme:{layout:"raw"}},docs:{type:"page",title:"Documentation"},about:{type:"page",title:"About",theme:{typesetting:"article"}},contact:{title:"IIIF Image API ↗",type:"page",href:"https://iiif.io/api/image/2.1/",newWindow:!0}}},{kind:"MdxPage",name:"about",route:"/about"},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{index:"Introduction","quick-start":"Quick Start","source-images":"Source Images","custom-sharp-layer":"Custom Sharp Layer","advanced-usage":"Advanced Usage",testing:"Testing",notes:"Notes","-- Contributing":{type:"separator",title:"Contributing"},"how-to-contribute":"Guide",contributors:"Contributors",communities:"Communities"}},{kind:"Folder",name:"advanced-usage",route:"/docs/advanced-usage",children:[{kind:"Meta",data:{cors:"Cross-Origin Request Sharing (CORS)","request-response-functions":"Request Response Functions"}},{kind:"MdxPage",name:"cors",route:"/docs/advanced-usage/cors"},{kind:"MdxPage",name:"request-response-functions",route:"/docs/advanced-usage/request-response-functions"}]},{kind:"Folder",name:"communities",route:"/docs/communities",children:[{kind:"MdxPage",name:"iiif",route:"/docs/communities/iiif"},{kind:"MdxPage",name:"samvera",route:"/docs/communities/samvera"},{kind:"Meta",data:{iiif:"Iiif",samvera:"Samvera"}}]},{kind:"MdxPage",name:"contributors",route:"/docs/contributors"},{kind:"MdxPage",name:"custom-sharp-layer",route:"/docs/custom-sharp-layer"},{kind:"MdxPage",name:"how-to-contribute",route:"/docs/how-to-contribute"},{kind:"MdxPage",name:"index",route:"/docs"},{kind:"MdxPage",name:"notes",route:"/docs/notes"},{kind:"Folder",name:"quick-start",route:"/docs/quick-start",children:[{kind:"Meta",data:{index:"Options","deployment-sam":"Deploying via the AWS Serverless Application Repository","deployment-command-line":"Deploying via the Command Line",infrastructure:"Deploying via Infrastructure Tools","deleting-the-app":"Deleting the App"}},{kind:"MdxPage",name:"deleting-the-app",route:"/docs/quick-start/deleting-the-app"},{kind:"MdxPage",name:"deployment-command-line",route:"/docs/quick-start/deployment-command-line"},{kind:"MdxPage",name:"deployment-sam",route:"/docs/quick-start/deployment-sam"},{kind:"MdxPage",name:"index",route:"/docs/quick-start"},{kind:"Folder",name:"infrastructure",route:"/docs/quick-start/infrastructure",children:[{kind:"Meta",data:{index:"Introduction",cloudformation:"AWS CloudFormation",terraform:"Terraform"}},{kind:"MdxPage",name:"cloudformation",route:"/docs/quick-start/infrastructure/cloudformation"},{kind:"MdxPage",name:"index",route:"/docs/quick-start/infrastructure"},{kind:"MdxPage",name:"terraform",route:"/docs/quick-start/infrastructure/terraform"}]}]},{kind:"MdxPage",name:"source-images",route:"/docs/source-images"},{kind:"MdxPage",name:"testing",route:"/docs/testing"}]},{kind:"MdxPage",name:"index",route:"/",frontMatter:{title:"Serverless IIIF – Serve images via IIIF"}}],flexsearch:{codeblocks:!0},title:"Custom Sharp Layer",headings:c},pageNextRoute:"/docs/custom-sharp-layer",nextraLayout:i.ZP,themeConfig:n.Z};t.default=(0,r.j)(l)},5131:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var s=a(5893),r=a(9554),i=a.n(r),n=a(1163),o={footer:{text:(0,s.jsxs)("span",{children:["MIT ",new Date().getFullYear()," \xa9 ",(0,s.jsx)("a",{href:"#",children:"Serverless IIIF"}),"."]})},head:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("meta",{property:"og:title",content:"Serverless IIIF"}),(0,s.jsx)("meta",{property:"og:description",content:"Serve images via IIIF"}),(0,s.jsx)("link",{rel:"shortcut icon",type:"image/png",href:"/favicon.png"})]}),logo:(0,s.jsx)(function(){return(0,s.jsxs)("span",{className:"jsx-6558685ef54f338d",children:[(0,s.jsxs)("svg",{id:"serverless-iiif-logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 635.01 75.82",className:"jsx-6558685ef54f338d",children:[(0,s.jsx)("path",{fill:"currentColor",d:"m23.41,61.94c4.03,0,6.92-.73,8.68-2.18,1.75-1.46,2.63-3.19,2.63-5.21,0-1.87-.69-3.38-2.07-4.54-1.38-1.16-3.42-2.15-6.1-2.97l-5.94-1.9c-4.03-1.34-7.6-2.84-10.7-4.48-3.1-1.64-5.49-3.77-7.17-6.38C1.06,31.66.22,28.34.22,24.3c0-6.2,2.35-11.12,7.06-14.78,4.7-3.66,11.24-5.49,19.6-5.49,4.26,0,8.04.41,11.37,1.23,3.32.82,5.94,2.04,7.84,3.64,1.9,1.61,2.86,3.57,2.86,5.88,0,1.72-.39,3.19-1.18,4.42s-1.77,2.3-2.97,3.19c-1.72-1.19-4-2.22-6.83-3.08-2.84-.86-5.97-1.29-9.41-1.29s-6.27.58-8.06,1.74c-1.79,1.16-2.69,2.67-2.69,4.54,0,1.49.6,2.71,1.79,3.64,1.19.93,2.99,1.77,5.38,2.52l6.16,1.9c6.79,2.09,12.02,4.87,15.68,8.34,3.66,3.47,5.49,8.12,5.49,13.94,0,6.27-2.43,11.37-7.28,15.29-4.85,3.92-11.87,5.88-21.06,5.88-4.56,0-8.62-.49-12.21-1.46-3.58-.97-6.44-2.39-8.57-4.26-2.13-1.87-3.19-4.03-3.19-6.5,0-1.94.58-3.6,1.74-4.98,1.16-1.38,2.44-2.41,3.86-3.08,2.02,1.64,4.54,3.12,7.56,4.42,3.02,1.31,6.44,1.96,10.25,1.96Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m66.98,54.88l-.67-11.2,27.78-4.37c-.15-2.09-1.05-4.03-2.69-5.82-1.64-1.79-4.07-2.69-7.28-2.69s-6.16,1.14-8.4,3.42c-2.24,2.28-3.44,5.51-3.58,9.69l.56,7.73c.67,4.11,2.43,7.04,5.26,8.79,2.84,1.76,6.2,2.63,10.08,2.63,3.14,0,6.08-.45,8.85-1.34,2.76-.9,5-1.83,6.72-2.8,1.12.67,2.03,1.61,2.74,2.8.71,1.2,1.06,2.46,1.06,3.81,0,2.24-.88,4.11-2.63,5.6-1.76,1.49-4.18,2.61-7.28,3.36-3.1.75-6.63,1.12-10.58,1.12-5.75,0-10.92-1.08-15.51-3.25-4.59-2.17-8.2-5.41-10.81-9.74-2.61-4.33-3.92-9.74-3.92-16.24,0-4.78.76-8.92,2.3-12.43,1.53-3.51,3.58-6.4,6.16-8.68,2.58-2.28,5.49-3.98,8.74-5.1,3.25-1.12,6.63-1.68,10.14-1.68,5.15,0,9.65,1.03,13.5,3.08,3.84,2.05,6.85,4.83,9.02,8.34,2.17,3.51,3.25,7.58,3.25,12.21,0,2.32-.64,4.07-1.9,5.26-1.27,1.2-3.02,1.94-5.26,2.24l-35.62,5.26Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m133.17,34.61v14h-16.58v-16.02c0-2.09.5-3.86,1.51-5.32,1.01-1.46,2.41-2.74,4.2-3.86,2.46-1.49,5.43-2.67,8.9-3.53,3.47-.86,7.11-1.29,10.92-1.29,7.62,0,11.42,2.54,11.42,7.62,0,1.2-.17,2.31-.5,3.36-.34,1.05-.73,1.94-1.18,2.69-.75-.15-1.66-.28-2.74-.39-1.08-.11-2.26-.17-3.53-.17-2.24,0-4.48.26-6.72.78-2.24.52-4.14,1.23-5.71,2.13Zm-16.58,9.74l16.58.34v29.12c-.75.22-1.79.43-3.14.62-1.34.19-2.8.28-4.37.28-3.14,0-5.43-.56-6.89-1.68s-2.18-3.14-2.18-6.05v-22.62Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m200.59,19.04c2.31,0,4.24.5,5.77,1.51,1.53,1.01,2.3,2.71,2.3,5.1,0,1.34-.37,3.44-1.12,6.27-.75,2.84-1.74,6.12-2.97,9.86-1.23,3.73-2.6,7.54-4.09,11.42-1.49,3.88-2.99,7.52-4.48,10.92-1.49,3.4-2.84,6.22-4.03,8.46-.82.6-2.13,1.14-3.92,1.62-1.79.48-3.77.73-5.94.73-2.54,0-4.72-.34-6.55-1.01-1.83-.67-3.12-1.72-3.86-3.14-.82-1.57-1.83-3.77-3.02-6.61-1.2-2.84-2.46-6.07-3.81-9.69-1.34-3.62-2.69-7.37-4.03-11.26-1.34-3.88-2.58-7.62-3.7-11.2-1.12-3.58-2.02-6.72-2.69-9.41.97-.97,2.22-1.81,3.75-2.52,1.53-.71,3.19-1.06,4.98-1.06,2.31,0,4.22.49,5.71,1.46,1.49.97,2.58,2.8,3.25,5.49l5.04,17.81c.6,2.09,1.21,4.18,1.85,6.27.63,2.09,1.21,4.03,1.74,5.82.52,1.79.97,3.32,1.34,4.59h.45c1.79-6.05,3.6-12.52,5.43-19.43,1.83-6.91,3.45-13.64,4.87-20.22,2.24-1.19,4.82-1.79,7.73-1.79Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m222.54,54.88l-.67-11.2,27.78-4.37c-.15-2.09-1.05-4.03-2.69-5.82-1.64-1.79-4.07-2.69-7.28-2.69s-6.16,1.14-8.4,3.42c-2.24,2.28-3.44,5.51-3.58,9.69l.56,7.73c.67,4.11,2.43,7.04,5.26,8.79,2.84,1.76,6.2,2.63,10.08,2.63,3.14,0,6.08-.45,8.85-1.34,2.76-.9,5-1.83,6.72-2.8,1.12.67,2.03,1.61,2.74,2.8.71,1.2,1.06,2.46,1.06,3.81,0,2.24-.88,4.11-2.63,5.6-1.76,1.49-4.18,2.61-7.28,3.36-3.1.75-6.63,1.12-10.58,1.12-5.75,0-10.92-1.08-15.51-3.25-4.59-2.17-8.2-5.41-10.81-9.74-2.61-4.33-3.92-9.74-3.92-16.24,0-4.78.76-8.92,2.3-12.43,1.53-3.51,3.58-6.4,6.16-8.68,2.58-2.28,5.49-3.98,8.74-5.1,3.25-1.12,6.63-1.68,10.14-1.68,5.15,0,9.65,1.03,13.5,3.08,3.84,2.05,6.85,4.83,9.02,8.34,2.17,3.51,3.25,7.58,3.25,12.21,0,2.32-.64,4.07-1.9,5.26-1.27,1.2-3.02,1.94-5.26,2.24l-35.62,5.26Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m288.73,34.61v14h-16.58v-16.02c0-2.09.5-3.86,1.51-5.32,1.01-1.46,2.41-2.74,4.2-3.86,2.46-1.49,5.43-2.67,8.9-3.53,3.47-.86,7.11-1.29,10.92-1.29,7.62,0,11.42,2.54,11.42,7.62,0,1.2-.17,2.31-.5,3.36-.34,1.05-.73,1.94-1.18,2.69-.75-.15-1.66-.28-2.74-.39-1.08-.11-2.26-.17-3.53-.17-2.24,0-4.48.26-6.72.78-2.24.52-4.14,1.23-5.71,2.13Zm-16.58,9.74l16.58.34v29.12c-.75.22-1.79.43-3.14.62-1.34.19-2.8.28-4.37.28-3.14,0-5.43-.56-6.89-1.68s-2.18-3.14-2.18-6.05v-22.62Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m331.29,53.31l-16.69-.34V1.01c.75-.22,1.79-.45,3.14-.67,1.34-.22,2.8-.34,4.37-.34,3.21,0,5.54.56,7,1.68,1.46,1.12,2.18,3.17,2.18,6.16v45.47Zm-16.69-8.96l16.69.34v29.12c-.75.22-1.79.43-3.14.62-1.34.19-2.8.28-4.37.28-3.14,0-5.45-.56-6.94-1.68-1.49-1.12-2.24-3.14-2.24-6.05v-22.62Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m349.21,54.88l-.67-11.2,27.78-4.37c-.15-2.09-1.05-4.03-2.69-5.82-1.64-1.79-4.07-2.69-7.28-2.69s-6.16,1.14-8.4,3.42c-2.24,2.28-3.44,5.51-3.58,9.69l.56,7.73c.67,4.11,2.43,7.04,5.26,8.79,2.84,1.76,6.2,2.63,10.08,2.63,3.14,0,6.08-.45,8.85-1.34,2.76-.9,5-1.83,6.72-2.8,1.12.67,2.03,1.61,2.74,2.8.71,1.2,1.06,2.46,1.06,3.81,0,2.24-.88,4.11-2.63,5.6-1.76,1.49-4.18,2.61-7.28,3.36-3.1.75-6.63,1.12-10.58,1.12-5.75,0-10.92-1.08-15.51-3.25-4.59-2.17-8.2-5.41-10.81-9.74-2.61-4.33-3.92-9.74-3.92-16.24,0-4.78.76-8.92,2.3-12.43,1.53-3.51,3.58-6.4,6.16-8.68,2.58-2.28,5.49-3.98,8.74-5.1,3.25-1.12,6.62-1.68,10.14-1.68,5.15,0,9.65,1.03,13.5,3.08,3.84,2.05,6.85,4.83,9.02,8.34,2.17,3.51,3.25,7.58,3.25,12.21,0,2.32-.63,4.07-1.9,5.26-1.27,1.2-3.02,1.94-5.26,2.24l-35.62,5.26Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m442.39,58.24c0,5.45-2.05,9.73-6.16,12.82-4.11,3.1-10.08,4.65-17.92,4.65-6.12,0-11.16-.9-15.12-2.69-3.96-1.79-5.94-4.44-5.94-7.95,0-1.57.34-2.93,1.01-4.09.67-1.16,1.53-2.07,2.58-2.74,2.09,1.2,4.54,2.3,7.34,3.3,2.8,1.01,5.99,1.51,9.58,1.51,5.45,0,8.18-1.57,8.18-4.7,0-1.34-.49-2.41-1.46-3.19-.97-.78-2.58-1.36-4.82-1.74l-4.7-1.12c-5.97-1.27-10.44-3.23-13.38-5.88-2.95-2.65-4.42-6.29-4.42-10.92,0-5.23,2.11-9.39,6.33-12.49,4.22-3.1,9.91-4.65,17.08-4.65,3.58,0,6.85.35,9.8,1.06,2.95.71,5.28,1.79,7,3.25,1.72,1.46,2.58,3.27,2.58,5.43,0,1.49-.3,2.8-.9,3.92-.6,1.12-1.38,2.05-2.35,2.8-.82-.52-2.07-1.08-3.75-1.68-1.68-.6-3.51-1.08-5.49-1.46-1.98-.37-3.83-.56-5.54-.56-2.69,0-4.78.36-6.27,1.06-1.49.71-2.24,1.81-2.24,3.3,0,.97.43,1.81,1.29,2.52.86.71,2.37,1.29,4.54,1.74l4.48,1.12c6.64,1.49,11.42,3.64,14.34,6.44,2.91,2.8,4.37,6.44,4.37,10.92Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m493.35,58.1c0,5.5-2.07,9.81-6.21,12.94-4.14,3.12-10.17,4.69-18.08,4.69-6.18,0-11.26-.9-15.25-2.71-3.99-1.81-5.99-4.48-5.99-8.02,0-1.58.34-2.96,1.02-4.12.68-1.17,1.54-2.09,2.6-2.77,2.11,1.21,4.58,2.32,7.4,3.33,2.83,1.02,6.05,1.53,9.66,1.53,5.5,0,8.25-1.58,8.25-4.75,0-1.36-.49-2.43-1.47-3.22-.98-.79-2.6-1.37-4.86-1.75l-4.75-1.13c-6.03-1.28-10.53-3.26-13.5-5.93-2.98-2.67-4.46-6.35-4.46-11.02,0-5.27,2.13-9.47,6.38-12.6,4.26-3.13,10-4.69,17.23-4.69,3.62,0,6.91.36,9.89,1.07,2.98.72,5.33,1.81,7.06,3.28,1.73,1.47,2.6,3.3,2.6,5.48,0,1.51-.3,2.82-.9,3.95-.6,1.13-1.39,2.07-2.37,2.83-.83-.53-2.09-1.09-3.79-1.69-1.7-.6-3.54-1.09-5.54-1.47-2-.38-3.86-.56-5.59-.56-2.71,0-4.82.36-6.33,1.07-1.51.72-2.26,1.83-2.26,3.33,0,.98.43,1.83,1.3,2.54.86.72,2.39,1.3,4.58,1.75l4.52,1.13c6.7,1.51,11.53,3.67,14.46,6.5,2.94,2.82,4.41,6.5,4.41,11.02Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m523.12,40.77h-9.07V6.05c.37-.15.95-.32,1.74-.5.78-.19,1.62-.28,2.52-.28,1.64,0,2.86.32,3.64.95.78.64,1.18,1.7,1.18,3.19v31.36Zm-9.07-7.5h9.07v40.43c-.38.15-.93.32-1.68.5-.75.19-1.57.28-2.46.28-1.64,0-2.88-.34-3.7-1.01-.82-.67-1.23-1.72-1.23-3.14v-37.07Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m549.11,40.77h-9.07V6.05c.37-.15.95-.32,1.74-.5.78-.19,1.62-.28,2.52-.28,1.64,0,2.86.32,3.64.95.78.64,1.18,1.7,1.18,3.19v31.36Zm-9.07-7.5h9.07v40.43c-.38.15-.93.32-1.68.5-.75.19-1.57.28-2.46.28-1.64,0-2.88-.34-3.7-1.01-.82-.67-1.23-1.72-1.23-3.14v-37.07Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m575.09,40.77h-9.07V6.05c.37-.15.95-.32,1.74-.5.78-.19,1.62-.28,2.52-.28,1.64,0,2.86.32,3.64.95.78.64,1.18,1.7,1.18,3.19v31.36Zm-9.07-7.5h9.07v40.43c-.38.15-.93.32-1.68.5-.75.19-1.57.28-2.46.28-1.64,0-2.88-.34-3.7-1.01-.82-.67-1.23-1.72-1.23-3.14v-37.07Z",className:"jsx-6558685ef54f338d"}),(0,s.jsx)("path",{fill:"currentColor",d:"m600.96,46.37l-9.07-.11V10.75c0-1.49.45-2.69,1.34-3.58.9-.9,2.09-1.34,3.58-1.34.82,0,1.64.11,2.46.34.82.22,1.38.41,1.68.56v39.65Zm-9.07-12.32h9.18v39.76c-.38.08-.95.2-1.74.39-.78.19-1.59.28-2.41.28-1.64,0-2.89-.34-3.75-1.01-.86-.67-1.29-1.68-1.29-3.02v-36.4Zm4.93-20.5v-7.73h37.18c.22.3.45.78.67,1.46.22.67.34,1.38.34,2.13,0,1.2-.3,2.18-.9,2.97-.6.78-1.46,1.18-2.58,1.18h-34.72Zm0,31.02v-7.73h33.26c.22.37.45.88.67,1.51.22.64.34,1.33.34,2.07,0,1.19-.3,2.18-.9,2.97-.6.78-1.46,1.18-2.58,1.18h-30.8Z",className:"jsx-6558685ef54f338d"})]}),(0,s.jsx)(i(),{id:"6558685ef54f338d",children:"svg.jsx-6558685ef54f338d{height:1rem}span.jsx-6558685ef54f338d{padding:.5rem .5rem .5rem 0;-webkit-mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-moz-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-o-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:linear-gradient(60deg,black 25%,rgba(0,0,0,.2)50%,black 75%);-webkit-mask-size:400%;mask-size:400%;-webkit-mask-position:0%;mask-position:0%}span.jsx-6558685ef54f338d:hover{-webkit-mask-position:100%;mask-position:100%;-webkit-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-moz-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-o-transition:mask-position 1s ease,-webkit-mask-position 1s ease;transition:mask-position 1s ease,-webkit-mask-position 1s ease}"})]})},{}),primaryHue:209,project:{link:"https://github.com/samvera/serverless-iiif"},sidebar:{autoCollapse:!0,defaultMenuCollapseLevel:1},useNextSeoProps(){let{asPath:e}=(0,n.useRouter)();if("/"!==e)return{titleTemplate:"%s – Serverless IIIF"}}}}},function(e){e.O(0,[476,888,774,179],function(){return e(e.s=1794)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/sX4dPFJPtFuAx8QDjwBRx/_buildManifest.js b/_next/static/sI4db0zedYvA4PHYbG3Fg/_buildManifest.js similarity index 97% rename from _next/static/sX4dPFJPtFuAx8QDjwBRx/_buildManifest.js rename to _next/static/sI4db0zedYvA4PHYbG3Fg/_buildManifest.js index c0e3233..5c7ee3b 100644 --- a/_next/static/sX4dPFJPtFuAx8QDjwBRx/_buildManifest.js +++ b/_next/static/sI4db0zedYvA4PHYbG3Fg/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,c,t,a){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,c,"static/css/e0e7c22adcdbef21.css","static/chunks/pages/index-7b9d461fb3e47d58.js"],"/_error":["static/chunks/pages/_error-5a00309fd5f4b49e.js"],"/about":[s,c,"static/css/e7f1e959babc9570.css","static/chunks/pages/about-657e567fda5e2492.js"],"/docs":[s,c,"static/css/a328a878aafba2bc.css","static/chunks/pages/docs-c3a8c0c08e050ef0.js"],"/docs/advanced-usage/cors":[s,c,"static/chunks/pages/docs/advanced-usage/cors-b0ca7f7320993e3f.js"],"/docs/advanced-usage/request-response-functions":[s,c,"static/chunks/pages/docs/advanced-usage/request-response-functions-36493bd5c4ad2318.js"],"/docs/communities/iiif":[s,c,"static/chunks/pages/docs/communities/iiif-c0a10a83513fad44.js"],"/docs/communities/samvera":[s,c,"static/chunks/pages/docs/communities/samvera-16fdca535a3795f8.js"],"/docs/contributors":[s,c,"static/chunks/pages/docs/contributors-8e24c85c22c6a351.js"],"/docs/custom-sharp-layer":[s,c,"static/chunks/pages/docs/custom-sharp-layer-1b87a5d81904c822.js"],"/docs/how-to-contribute":[s,c,"static/chunks/pages/docs/how-to-contribute-ecec2dcf317e9525.js"],"/docs/notes":[s,c,"static/chunks/pages/docs/notes-bd9ef6f31d1f49d7.js"],"/docs/quick-start":[s,c,"static/chunks/pages/docs/quick-start-37d838b2673c018c.js"],"/docs/quick-start/deleting-the-app":[s,c,"static/chunks/pages/docs/quick-start/deleting-the-app-36af7d08734e72d6.js"],"/docs/quick-start/deployment-command-line":[s,c,"static/chunks/pages/docs/quick-start/deployment-command-line-dce8d38dd856f7cd.js"],"/docs/quick-start/deployment-sam":[s,c,"static/chunks/pages/docs/quick-start/deployment-sam-593d313c59aaaf2e.js"],"/docs/quick-start/infrastructure":[s,c,"static/chunks/pages/docs/quick-start/infrastructure-97e0a03f8b6e3f65.js"],"/docs/quick-start/infrastructure/cloudformation":[s,c,t,a,"static/chunks/pages/docs/quick-start/infrastructure/cloudformation-b9d4a0e01541c4fc.js"],"/docs/quick-start/infrastructure/terraform":[s,c,t,a,"static/chunks/pages/docs/quick-start/infrastructure/terraform-efb74eca1b009be9.js"],"/docs/source-images":[s,c,"static/chunks/pages/docs/source-images-ac6a6898542e6b7f.js"],"/docs/testing":[s,c,"static/chunks/pages/docs/testing-63c2308cb4545896.js"],sortedPages:["/","/_app","/_error","/about","/docs","/docs/advanced-usage/cors","/docs/advanced-usage/request-response-functions","/docs/communities/iiif","/docs/communities/samvera","/docs/contributors","/docs/custom-sharp-layer","/docs/how-to-contribute","/docs/notes","/docs/quick-start","/docs/quick-start/deleting-the-app","/docs/quick-start/deployment-command-line","/docs/quick-start/deployment-sam","/docs/quick-start/infrastructure","/docs/quick-start/infrastructure/cloudformation","/docs/quick-start/infrastructure/terraform","/docs/source-images","/docs/testing"]}}("static/css/445c4173ffc2bf04.css","static/chunks/476-40a897354fca0d85.js","static/chunks/160-5af51da9a6325e15.js","static/css/2799bd547bb37cdf.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(s,c,t,a){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,c,"static/css/e0e7c22adcdbef21.css","static/chunks/pages/index-7b9d461fb3e47d58.js"],"/_error":["static/chunks/pages/_error-5a00309fd5f4b49e.js"],"/about":[s,c,"static/css/e7f1e959babc9570.css","static/chunks/pages/about-657e567fda5e2492.js"],"/docs":[s,c,"static/css/a328a878aafba2bc.css","static/chunks/pages/docs-c3a8c0c08e050ef0.js"],"/docs/advanced-usage/cors":[s,c,"static/chunks/pages/docs/advanced-usage/cors-b0ca7f7320993e3f.js"],"/docs/advanced-usage/request-response-functions":[s,c,"static/chunks/pages/docs/advanced-usage/request-response-functions-36493bd5c4ad2318.js"],"/docs/communities/iiif":[s,c,"static/chunks/pages/docs/communities/iiif-c0a10a83513fad44.js"],"/docs/communities/samvera":[s,c,"static/chunks/pages/docs/communities/samvera-16fdca535a3795f8.js"],"/docs/contributors":[s,c,"static/chunks/pages/docs/contributors-8e24c85c22c6a351.js"],"/docs/custom-sharp-layer":[s,c,"static/chunks/pages/docs/custom-sharp-layer-7ca61df03454b1d4.js"],"/docs/how-to-contribute":[s,c,"static/chunks/pages/docs/how-to-contribute-ecec2dcf317e9525.js"],"/docs/notes":[s,c,"static/chunks/pages/docs/notes-bd9ef6f31d1f49d7.js"],"/docs/quick-start":[s,c,"static/chunks/pages/docs/quick-start-37d838b2673c018c.js"],"/docs/quick-start/deleting-the-app":[s,c,"static/chunks/pages/docs/quick-start/deleting-the-app-36af7d08734e72d6.js"],"/docs/quick-start/deployment-command-line":[s,c,"static/chunks/pages/docs/quick-start/deployment-command-line-dce8d38dd856f7cd.js"],"/docs/quick-start/deployment-sam":[s,c,"static/chunks/pages/docs/quick-start/deployment-sam-593d313c59aaaf2e.js"],"/docs/quick-start/infrastructure":[s,c,"static/chunks/pages/docs/quick-start/infrastructure-97e0a03f8b6e3f65.js"],"/docs/quick-start/infrastructure/cloudformation":[s,c,t,a,"static/chunks/pages/docs/quick-start/infrastructure/cloudformation-b9d4a0e01541c4fc.js"],"/docs/quick-start/infrastructure/terraform":[s,c,t,a,"static/chunks/pages/docs/quick-start/infrastructure/terraform-efb74eca1b009be9.js"],"/docs/source-images":[s,c,"static/chunks/pages/docs/source-images-ac6a6898542e6b7f.js"],"/docs/testing":[s,c,"static/chunks/pages/docs/testing-63c2308cb4545896.js"],sortedPages:["/","/_app","/_error","/about","/docs","/docs/advanced-usage/cors","/docs/advanced-usage/request-response-functions","/docs/communities/iiif","/docs/communities/samvera","/docs/contributors","/docs/custom-sharp-layer","/docs/how-to-contribute","/docs/notes","/docs/quick-start","/docs/quick-start/deleting-the-app","/docs/quick-start/deployment-command-line","/docs/quick-start/deployment-sam","/docs/quick-start/infrastructure","/docs/quick-start/infrastructure/cloudformation","/docs/quick-start/infrastructure/terraform","/docs/source-images","/docs/testing"]}}("static/css/445c4173ffc2bf04.css","static/chunks/476-40a897354fca0d85.js","static/chunks/160-5af51da9a6325e15.js","static/css/2799bd547bb37cdf.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/sX4dPFJPtFuAx8QDjwBRx/_ssgManifest.js b/_next/static/sI4db0zedYvA4PHYbG3Fg/_ssgManifest.js similarity index 100% rename from _next/static/sX4dPFJPtFuAx8QDjwBRx/_ssgManifest.js rename to _next/static/sI4db0zedYvA4PHYbG3Fg/_ssgManifest.js diff --git a/about.html b/about.html index 066cdd0..34e2b7d 100644 --- a/about.html +++ b/about.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -

About

+
\ No newline at end of file +

Serverless IIIF is available under the Apache 2.0 license.

\ No newline at end of file diff --git a/docs.html b/docs.html index 2212c31..9153231 100644 --- a/docs.html +++ b/docs.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Introduction

serverless-iiif

+
Documentation
Introduction

serverless-iiif

Description

A cost-effective, infinitely scalable IIIF 2.1 (opens in a new tab) and 3.0 (opens in a new tab) image API compliant service packaged as an AWS Serverless Application (opens in a new tab) with minimum setup and no maintenance. Suitable for large institutional collections or small digital humanities projects.

@@ -29,4 +29,4 @@

💡

Note: The Lambda Function will be granted read access to this bucket.

License

-

serverless-iiif is available under the Apache 2.0 license.

\ No newline at end of file +

serverless-iiif is available under the Apache 2.0 license.

Options
\ No newline at end of file diff --git a/docs/advanced-usage/cors.html b/docs/advanced-usage/cors.html index e15b83e..3bb74b6 100644 --- a/docs/advanced-usage/cors.html +++ b/docs/advanced-usage/cors.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Advanced Usage
Cross-Origin Request Sharing (CORS)

Cross-Origin Request Sharing (CORS)

+
Documentation
Advanced Usage
Cross-Origin Request Sharing (CORS)

Cross-Origin Request Sharing (CORS)

For security reasons, web browsers have built in limits on what sort of requests can be made to a given domain from a page hosted under a different domain. Since this is a common use case for IIIF (resources embedded in pages whose domains differ from that of the server), IIIF interactions are particularly susceptible to these limits.

The mechanism for determining which of these requests should be allowed or blocked is known as Cross-Origin Resource Sharing, or CORS (opens in a new tab). A full explanation of CORS is beyond the scope of this project, but the SAM deploy template contains five parameters relating to how the IIIF server handles CORS:

    @@ -21,4 +21,4 @@
  • CorsExposeHeaders contains the value that will be returned in the Access-Control-Expose-Headers response header.
  • CorsMaxAge contains the value that will be returned in the Access-Control-Max-Age response header.
-

The default values will work in most circumstances, but if you need the IIIF server to accept requests that include credentials or other potentially sensitive information (e.g., Authorization and/or Cookie headers), you'll need to set CorsAllowOrigin to REFLECT_ORIGIN and CorsAllowCredentials to true. Other settings allow further customization.

\ No newline at end of file +

The default values will work in most circumstances, but if you need the IIIF server to accept requests that include credentials or other potentially sensitive information (e.g., Authorization and/or Cookie headers), you'll need to set CorsAllowOrigin to REFLECT_ORIGIN and CorsAllowCredentials to true. Other settings allow further customization.

\ No newline at end of file diff --git a/docs/advanced-usage/request-response-functions.html b/docs/advanced-usage/request-response-functions.html index a0f2adb..18443ce 100644 --- a/docs/advanced-usage/request-response-functions.html +++ b/docs/advanced-usage/request-response-functions.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Advanced Usage
Request Response Functions

Request/Response Functions

+
Documentation
Advanced Usage
Request Response Functions

Request/Response Functions

The IIIF service can be heavily customized through the use of CloudFront Functions (opens in a new tab) or Lambda@Edge Functions (opens in a new tab) attached to a CloudFront distribution in front of the service. It's important to understand the four stages of CloudFront processing in order to know where a given type of customization belongs.

  • A viewer-request function will be called on every request, cached or not. This is the appropriate place to attach @@ -56,4 +56,4 @@
    { width: 2048, height: 1536, limit: 480 }

The limit calculator will keep going until both dimensions are less than the limit, not less than or equal to. So a limit: 512 on the third example above would generate a fourth page at { width: 256, height: 192 }.

-
💡

If you plan to use CloudFront functions to add either of the above x-preflight- headers to incoming requests, you must set the value of the Preflight parameter to true when deploying serverless-iiif. The function will only look for the preflight headers if this environment variable is true. This prevents requests from including those headers directly if no preflight function is present. If you do use a preflight function, make sure it strips out any x-preflight-location and x-preflight-dimensions headers that it doesn't set itself.

\ No newline at end of file +
💡

If you plan to use CloudFront functions to add either of the above x-preflight- headers to incoming requests, you must set the value of the Preflight parameter to true when deploying serverless-iiif. The function will only look for the preflight headers if this environment variable is true. This prevents requests from including those headers directly if no preflight function is present. If you do use a preflight function, make sure it strips out any x-preflight-location and x-preflight-dimensions headers that it doesn't set itself.

\ No newline at end of file diff --git a/docs/communities/iiif.html b/docs/communities/iiif.html index 05fc84b..6649015 100644 --- a/docs/communities/iiif.html +++ b/docs/communities/iiif.html @@ -11,4 +11,4 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/communities/samvera.html b/docs/communities/samvera.html index 8c4ed24..ddcfece 100644 --- a/docs/communities/samvera.html +++ b/docs/communities/samvera.html @@ -11,4 +11,4 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/contributors.html b/docs/contributors.html index 9894a2a..e215b04 100644 --- a/docs/contributors.html +++ b/docs/contributors.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Contributors

Contributors

+
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/custom-sharp-layer.html b/docs/custom-sharp-layer.html index 52fb411..7fbe585 100644 --- a/docs/custom-sharp-layer.html +++ b/docs/custom-sharp-layer.html @@ -11,6 +11,6 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/how-to-contribute.html b/docs/how-to-contribute.html index ddbbc4a..3ac0d68 100644 --- a/docs/how-to-contribute.html +++ b/docs/how-to-contribute.html @@ -11,6 +11,6 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Guide

How to Contribute?

+
Documentation
Guide

How to Contribute?

If you're working on a PR (opens in a new tab) for this project, create a feature branch off of main.

-

This repository follows the Samvera Community Code of Conduct (opens in a new tab) and language recommendations (opens in a new tab). Please do not create a branch called master for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.

\ No newline at end of file +

This repository follows the Samvera Community Code of Conduct (opens in a new tab) and language recommendations (opens in a new tab). Please do not create a branch called master for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.

\ No newline at end of file diff --git a/docs/notes.html b/docs/notes.html index d55daae..346b9db 100644 --- a/docs/notes.html +++ b/docs/notes.html @@ -11,5 +11,5 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Notes

Notes

-

serverless-iiif takes advantage of AWS Lambda URLs' streaming response (opens in a new tab) functionality to overcome the 6MB response limit that previous versions were subject to. Instead of a hard limit of 6MB, there is now a soft limit of approximately 20MB for each response. This limit can be adjusted by opening a support ticket with AWS requesting a quota increase. In addition, the streaming rate for the first 6MB of each response is uncapped; data over 6MB is capped at 2MB/s.

\ No newline at end of file +
Documentation
Notes

Notes

+

serverless-iiif takes advantage of AWS Lambda URLs' streaming response (opens in a new tab) functionality to overcome the 6MB response limit that previous versions were subject to. Instead of a hard limit of 6MB, there is now a soft limit of approximately 20MB for each response. This limit can be adjusted by opening a support ticket with AWS requesting a quota increase. In addition, the streaming rate for the first 6MB of each response is uncapped; data over 6MB is capped at 2MB/s.

\ No newline at end of file diff --git a/docs/quick-start.html b/docs/quick-start.html index 078f3c9..c52ec81 100644 --- a/docs/quick-start.html +++ b/docs/quick-start.html @@ -11,4 +11,4 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/quick-start/deleting-the-app.html b/docs/quick-start/deleting-the-app.html index 63045ff..1399fa8 100644 --- a/docs/quick-start/deleting-the-app.html +++ b/docs/quick-start/deleting-the-app.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Quick Start
Deleting the App

Deleting the application

+
Documentation
Quick Start
Deleting the App

Deleting the application

If you deployed the application on its own, the easiest way to delete the application is either from the Lambda Applications Console (opens in a new tab) or by deleting its CloudFormation Stack (opens in a new tab).

If you deployed from the command line, you can also use the npm run delete command.

-

If you deployed using an infrastructure tool such as AWS CloudFormation or Terraform, you should use that tool's destroy/teardown functionality to remove the IIIF stack as well.

\ No newline at end of file +

If you deployed using an infrastructure tool such as AWS CloudFormation or Terraform, you should use that tool's destroy/teardown functionality to remove the IIIF stack as well.

\ No newline at end of file diff --git a/docs/quick-start/deployment-command-line.html b/docs/quick-start/deployment-command-line.html index c15e85e..ea80dc9 100644 --- a/docs/quick-start/deployment-command-line.html +++ b/docs/quick-start/deployment-command-line.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Quick Start
Deploying via the Command Line

Deploying via the Command Line

+
Documentation
Quick Start
Deploying via the Command Line

Deploying via the Command Line

Prerequisites

  • Docker (opens in a new tab)
  • @@ -22,4 +22,4 @@

    $ npm run deploy-guided # To deploy using the current configuration, prompting only for changeset confirmation -$ npm run deploy

If you use the guided deploy, you'll be prompted for various configuration parameters, confirmations, and acknowledgments of specific issues (particularly the creation of IAM resources and the deployment of an open/unauthenticated Lambda Function URL). Otherwise, you'll simply be asked to confirm the calculated changeset.

Step 6

Follow the prompts to complete the deployment process and get the resulting endpoint.

\ No newline at end of file +$ npm run deploy

If you use the guided deploy, you'll be prompted for various configuration parameters, confirmations, and acknowledgments of specific issues (particularly the creation of IAM resources and the deployment of an open/unauthenticated Lambda Function URL). Otherwise, you'll simply be asked to confirm the calculated changeset.

Step 6

Follow the prompts to complete the deployment process and get the resulting endpoint.

Deploying via the AWS Serverless Application RepositoryIntroduction
\ No newline at end of file diff --git a/docs/quick-start/deployment-sam.html b/docs/quick-start/deployment-sam.html index 42d3cea..b2db081 100644 --- a/docs/quick-start/deployment-sam.html +++ b/docs/quick-start/deployment-sam.html @@ -11,11 +11,11 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Quick Start
Deploying via the AWS Serverless Application Repository

Deploying via the AWS Serverless Application Repository

+
Documentation
Quick Start
Deploying via the AWS Serverless Application Repository

Deploying via the AWS Serverless Application Repository

serverless-iiif is distributed and deployed via the AWS Serverless Application Repository (opens in a new tab). To deploy it using the AWS Console:

Step 1

Find the serverless-iiif application (opens in a new tab) in the AWS Serverless Application Repository.

Step 2

Make sure your currently selected region (in the console's top navigation bar) is the one you want to deploy to.

Step 3

Scroll down to the Application settings section.

Step 4

Configure the deploy template:

  • Give your stack a unique Application name
  • Enter the name of the SourceBucket the service will serve images from
  • Check the box acknowledging that the app will create a custom IAM roles and resource policies (and if deploying the Caching version, that it will also deploy a nested application)
  • Optional: Enter or change any other parameters that apply to your desired configuration.
  • -

Step 5

Click Deploy.

Step 6

When all the resources are properly created and configured, the new stack should be in the CREATE_COMPLETE stage. If there's an error, it will delete all the resources it created, roll back any changes it made, and eventually reach the ROLLBACK_COMPLETE stage.

Step 7

Click the CloudFormation stack link.

Step 8

Click the Outputs tab to see (and copy) the IIIF Endpoint URL.

\ No newline at end of file +

Step 5

Click Deploy.

Step 6

When all the resources are properly created and configured, the new stack should be in the CREATE_COMPLETE stage. If there's an error, it will delete all the resources it created, roll back any changes it made, and eventually reach the ROLLBACK_COMPLETE stage.

Step 7

Click the CloudFormation stack link.

Step 8

Click the Outputs tab to see (and copy) the IIIF Endpoint URL.

\ No newline at end of file diff --git a/docs/quick-start/infrastructure.html b/docs/quick-start/infrastructure.html index 075bcf8..d7497fd 100644 --- a/docs/quick-start/infrastructure.html +++ b/docs/quick-start/infrastructure.html @@ -11,5 +11,5 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Quick Start
Deploying via Infrastructure Tools
Introduction

Deploying via Infrastructure Tools

-

You will most likely want to deploy serverless-iiif as part of a larger infrastructure stack. This stack might include a caching layer (AWS CloudFront), functions to customize the services behavior, a custom domain name, and more. This section provides documentation and examples of how to deploy the service using AWS CloudFormation or Terraform.

\ No newline at end of file +
Documentation
Quick Start
Deploying via Infrastructure Tools
Introduction

Deploying via Infrastructure Tools

+

You will most likely want to deploy serverless-iiif as part of a larger infrastructure stack. This stack might include a caching layer (AWS CloudFront), functions to customize the services behavior, a custom domain name, and more. This section provides documentation and examples of how to deploy the service using AWS CloudFormation or Terraform.

\ No newline at end of file diff --git a/docs/quick-start/infrastructure/cloudformation.html b/docs/quick-start/infrastructure/cloudformation.html index 88a6981..5342372 100644 --- a/docs/quick-start/infrastructure/cloudformation.html +++ b/docs/quick-start/infrastructure/cloudformation.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Quick Start
Deploying via Infrastructure Tools
AWS CloudFormation

Installing serverless-iiif as part of a CloudFormation (opens in a new tab) template makes it easy to integrate the service with other components. Please refer to the example and the CloudFormation documentation (opens in a new tab) for more information on how you might tailor these templates to your own needs and deploy them to AWS.

+
Documentation
Quick Start
Deploying via Infrastructure Tools
AWS CloudFormation

Installing serverless-iiif as part of a CloudFormation (opens in a new tab) template makes it easy to integrate the service with other components. Please refer to the example and the CloudFormation documentation (opens in a new tab) for more information on how you might tailor these templates to your own needs and deploy them to AWS.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

Type: AWS::Serverless::Application
@@ -149,4 +149,4 @@ 

Value: !Ref CachingEndpoint Export: Name: !Sub "${AWS::StackName}:DistributionId" -

\ No newline at end of file +
IntroductionTerraform
\ No newline at end of file diff --git a/docs/quick-start/infrastructure/terraform.html b/docs/quick-start/infrastructure/terraform.html index 1425fdd..89fdb5a 100644 --- a/docs/quick-start/infrastructure/terraform.html +++ b/docs/quick-start/infrastructure/terraform.html @@ -11,8 +11,8 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Quick Start
Deploying via Infrastructure Tools
Terraform

The serverless-iiif GitHub repository includes a Terraform Module (opens in a new tab) that can be used as a drop-in component in any +

Documentation
Quick Start
Deploying via Infrastructure Tools
Terraform

The serverless-iiif GitHub repository includes a Terraform Module (opens in a new tab) that can be used as a drop-in component in any Terraform manifest. Please refer to the documentation and examples below, as well as the Terraform documentation (opens in a new tab) for more information on how you might use these tools to deploy your own custom stack to AWS.

Required Inputs


These variables must be set in the module block when using this module.

source_bucket string

Description: Name of bucket containing source images

Optional Inputs


These variables have default values and don't have to be set to use this module. You may set these variables to override their default -values.

cors_allow_headers string

Description: Value of the CORS Access-Control-Allow-Headers response header

Default: *

cors_allow_origin string

Description: Value of the CORS Access-Control-Allow-Origin response header. Use the special value REFLECT_ORIGIN to copy the value from the Origin request header (required to emulate * for XHR requests using Authorization and/or Cookie headers).

Default: *

cors_expose_headers string

Description: Value of the CORS Access-Control-Expose-Headers response header

Default: cache-control,content-language,content-length,content-type,date,expires,last-modified,pragma

cors_max_age number

Description: Value of the CORS Access-Control-MaxAge response header

Default: 3600

force_host string

Description: Forced hostname to use in responses

Default: ""

iiif_lambda_memory number

Description: The memory provisioned for the lambda.

Default: 3008

iiif_lambda_timeout number

Description: The timeout for the lambda.

Default: 10

pixel_density number

Description: Hardcoded DPI/Pixel Density/Resolution to encode in output images

Default: 0

pyramid_limit number

Description: Smallest pyramid image dimension. Set to 0 to prevent server from auto-calculating pyramid page sizes.

Default: 256

resolver_template string

Description: A printf-style format string that determines the location of source image within the bucket given the image ID

Default: %s.tif

sharp_layer string

Description: ARN of a custom AWS Lambda Layer containing the sharp and libvips dependencies. Use the special value JP2 to use the managed JPEG2000-compatible layer, or INTERNAL to use the built-in dependencies (without JPEG2000 support).

Default: JP2

\ No newline at end of file +values.

cors_allow_headers string

Description: Value of the CORS Access-Control-Allow-Headers response header

Default: *

cors_allow_origin string

Description: Value of the CORS Access-Control-Allow-Origin response header. Use the special value REFLECT_ORIGIN to copy the value from the Origin request header (required to emulate * for XHR requests using Authorization and/or Cookie headers).

Default: *

cors_expose_headers string

Description: Value of the CORS Access-Control-Expose-Headers response header

Default: cache-control,content-language,content-length,content-type,date,expires,last-modified,pragma

cors_max_age number

Description: Value of the CORS Access-Control-MaxAge response header

Default: 3600

force_host string

Description: Forced hostname to use in responses

Default: ""

iiif_lambda_memory number

Description: The memory provisioned for the lambda.

Default: 3008

iiif_lambda_timeout number

Description: The timeout for the lambda.

Default: 10

pixel_density number

Description: Hardcoded DPI/Pixel Density/Resolution to encode in output images

Default: 0

pyramid_limit number

Description: Smallest pyramid image dimension. Set to 0 to prevent server from auto-calculating pyramid page sizes.

Default: 256

resolver_template string

Description: A printf-style format string that determines the location of source image within the bucket given the image ID

Default: %s.tif

sharp_layer string

Description: ARN of a custom AWS Lambda Layer containing the sharp and libvips dependencies. Use the special value JP2 to use the managed JPEG2000-compatible layer, or INTERNAL to use the built-in dependencies (without JPEG2000 support).

Default: JP2

\ No newline at end of file diff --git a/docs/source-images.html b/docs/source-images.html index d765ed2..7902324 100644 --- a/docs/source-images.html +++ b/docs/source-images.html @@ -11,7 +11,7 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Source Images

Source Images

+
Documentation
Source Images

Source Images

The S3 key of any given file, minus the extension, is its IIIF ID. For example, if you want to access the image manifest for the file at abcdef.tif, you would get https://.../iiif/2/abcdef/info.json. If your key contains slashes, they must be URL-encoded: e.g., ab/cd/ef/gh.tif would be at https://.../iiif/2/ab%2Fcd%2Fef%2Fgh/info.json. (This limitation could easily be fixed by encoding only the necessary slashes in the incoming URL before handing it off to the IIIF processor, but that's beyond the scope of the demo.)

iiif-processor can use any image format natively supported by libvips (opens in a new tab), including JPEG 2000 (.jp2), but best results will come from using tiled, multi-resolution TIFFs. The Lambda Function wrapper included in this application assumes a .tif extension unless you set ResolverTemplate in your .env file.

⚠️

Some versions of libvips and libjpeg have an issue with JPEG-compressed pyramidal TIFF images that include more than 3 channels (e.g., @@ -28,4 +28,4 @@

&& vips tiffsave temp_image.v output_image.tif --tile --pyramid --compression jpeg --tile-width 256 --tile-height 256 \ && rm temp_image.v

Using ImageMagick

-
convert source_image.tif -alpha off -define tiff:tile-geometry=256x256 -compress jpeg 'ptif:output_image.tif'
\ No newline at end of file +
convert source_image.tif -alpha off -define tiff:tile-geometry=256x256 -compress jpeg 'ptif:output_image.tif'
\ No newline at end of file diff --git a/docs/testing.html b/docs/testing.html index 8ff1824..ec940e2 100644 --- a/docs/testing.html +++ b/docs/testing.html @@ -11,8 +11,8 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -
Documentation
Testing

Testing

+
Documentation
Testing

Testing

If tests are run locally they will start in "watch" mode. If a CI environment is detected they will only run once. From the project root run:

npm test

To generate a code coverage report run:

-
npm test --coverage
\ No newline at end of file +
npm test --coverage
\ No newline at end of file diff --git a/index.html b/index.html index c1cb35d..b33d5db 100644 --- a/index.html +++ b/index.html @@ -11,4 +11,4 @@ --nextra-primary-hue: 209deg; --nextra-primary-saturation: 100%; } -

Fast, zoomable images without servers

A cost-effective, infinitely scalable IIIF Image API v2.1 and v3.0 compliant service packaged as an AWS Serverless Application with minimum setup and no maintenance. Suitable for large institutional collections or small digital humanities projects.
Community Driven. Open Source.

Deploy Now  Read the Docs IIIF Image API
\ No newline at end of file +

Fast, zoomable images without servers

A cost-effective, infinitely scalable IIIF Image API v2.1 and v3.0 compliant service packaged as an AWS Serverless Application with minimum setup and no maintenance. Suitable for large institutional collections or small digital humanities projects.
Community Driven. Open Source.

Deploy Now  Read the Docs IIIF Image API
\ No newline at end of file