Skip to content

Commit

Permalink
Use preflight if either viewer-request or origin-request is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Mar 21, 2024
1 parent 185574a commit bdda29b
Show file tree
Hide file tree
Showing 13 changed files with 914 additions and 765 deletions.
4 changes: 2 additions & 2 deletions bin/update_version
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
sedreplace="sed -Ei"
fi

for edition in . standalone cloudfront; do
$sedreplace "s/SemanticVersion: .+/SemanticVersion: $version/" $root/sam/$edition/template.yml
for template in sam/template.yml sam/standalone/template.yml sam/cloudfront/template.yml examples/sam/customization/template.yaml examples/cloudformation/custom_hostname.yml; do
$sedreplace "s/SemanticVersion: .+/SemanticVersion: $version/" $root/$template
done
$sedreplace "s/ serverless_iiif_app_version =.+/ serverless_iiif_app_version = \"$version\"/" $root/extras/terraform/main.tf
93 changes: 66 additions & 27 deletions dependencies/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dependencies/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-iiif-dependencies",
"version": "5.0.2",
"version": "5.0.3",
"description": "Dependencies for serverless IIIF",
"author": "Michael B. Klein",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/cloudformation/custom_hostname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Resources:
Properties:
Location:
ApplicationId: arn:aws:serverlessrepo:us-east-1:625046682746:applications/serverless-iiif-standalone-dev
SemanticVersion: 5.0.0
SemanticVersion: 5.0.3
Parameters:
SourceBucket: !Ref IiifSourceBucket
ResponseHeaderPolicy:
Expand Down
2 changes: 1 addition & 1 deletion examples/sam/customization/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Resources:
Properties:
Location:
ApplicationId: arn:aws:serverlessrepo:us-east-1:625046682746:applications/serverless-iiif
SemanticVersion: 5.0.0
SemanticVersion: 5.0.3
Parameters:
CorsAllowOrigin: REFLECT_ORIGIN
ForceHost: !Ref CacheDomainName
Expand Down
2 changes: 1 addition & 1 deletion extras/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ terraform {

locals {
serverless_iiif_app_id = "arn:aws:serverlessrepo:us-east-1:625046682746:applications/serverless-iiif"
serverless_iiif_app_version = "5.0.2"
serverless_iiif_app_version = "5.0.3"
}

resource "aws_serverlessapplicationrepository_cloudformation_stack" "serverless_iiif" {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-iiif",
"version": "5.0.2",
"version": "5.0.3",
"description": "Lambda wrapper for iiif-processor",
"author": "Michael B. Klein",
"license": "Apache-2.0",
Expand Down
10 changes: 7 additions & 3 deletions sam/cloudfront/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Metadata:
ReadmeUrl: ./README.md
Labels: ["iiif", "image-processing"]
HomePageUrl: https://samvera.github.io/serverless-iiif
SemanticVersion: 5.0.2
SemanticVersion: 5.0.3
SourceCodeUrl: https://github.com/samvera/serverless-iiif
AWS::CloudFormation::Interface:
ParameterGroups:
Expand Down Expand Up @@ -180,6 +180,10 @@ Conditions:
UseOriginResponse:
Fn::Not:
- Fn::Equals: [!Ref OriginResponseARN, ""]
UsePreflight:
Fn::Or:
- Condition: UseOriginRequest
- Condition: UseViewerRequest
UseViewerRequest:
Fn::And:
- Fn::Not:
Expand Down Expand Up @@ -320,7 +324,7 @@ Resources:
Properties:
Location:
ApplicationId: arn:aws:serverlessrepo:us-east-1:625046682746:applications/serverless-iiif
SemanticVersion: 5.0.2
SemanticVersion: 5.0.3
Parameters:
CorsAllowCredentials: !Ref CorsAllowCredentials
CorsAllowOrigin: !Ref CorsAllowOrigin
Expand All @@ -337,7 +341,7 @@ Resources:
PixelDensity: !Ref PixelDensity
Preflight:
Fn::If:
- UseViewerRequest
- UsePreflight
- true
- false
PyramidLimit: !Ref PyramidLimit
Expand Down
4 changes: 2 additions & 2 deletions sam/standalone/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Metadata:
ReadmeUrl: ./README.md
Labels: ["iiif", "image-processing"]
HomePageUrl: https://samvera.github.io/serverless-iiif
SemanticVersion: 5.0.2
SemanticVersion: 5.0.3
SourceCodeUrl: https://github.com/samvera/serverless-iiif
AWS::CloudFormation::Interface:
ParameterGroups:
Expand Down Expand Up @@ -118,7 +118,7 @@ Resources:
Properties:
Location:
ApplicationId: arn:aws:serverlessrepo:us-east-1:625046682746:applications/serverless-iiif
SemanticVersion: 5.0.2
SemanticVersion: 5.0.3
Parameters:
CorsAllowCredentials: !Ref CorsAllowCredentials
CorsAllowHeaders: !Ref CorsAllowHeaders
Expand Down
2 changes: 1 addition & 1 deletion sam/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Metadata:
ReadmeUrl: ../README.md
Labels: ["iiif", "image-processing"]
HomePageUrl: https://samvera.github.io/serverless-iiif
SemanticVersion: 5.0.2
SemanticVersion: 5.0.3
SourceCodeUrl: https://github.com/samvera/serverless-iiif
AWS::CloudFormation::Interface:
ParameterGroups:
Expand Down
Loading

0 comments on commit bdda29b

Please sign in to comment.