Skip to content
Snippets Groups Projects
Commit e4601e37 authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

redirect til api/index.html

parent 4f413d09
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,10 @@ deploy: ...@@ -28,7 +28,10 @@ deploy:
--capabilities CAPABILITY_IAM --capabilities CAPABILITY_IAM
- aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive - aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive
- aws s3 sync dist/ "s3://${STACK_NAME}.aws.uib.no" --delete - aws s3 sync dist/ "s3://${STACK_NAME}.aws.uib.no" --delete
- aws s3api put-object --bucket "${STACK_NAME}.aws.uib.no" --key api/index.html --body api_static/index.html - aws s3api put-object --bucket "${STACK_NAME}.aws.uib.no"
--key api/index.html
--body api_static/index.html
--content-type "text/html;charset=UTF-8"
- DISTRO_ID=$(aws cloudformation describe-stack-resource - DISTRO_ID=$(aws cloudformation describe-stack-resource
--stack-name ${STACK_NAME} --stack-name ${STACK_NAME}
--logical-resource-id Distribution --logical-resource-id Distribution
......
...@@ -143,6 +143,10 @@ Resources: ...@@ -143,6 +143,10 @@ Resources:
- HEAD - HEAD
Compress: true Compress: true
TargetOriginId: s3ProductionBucket TargetOriginId: s3ProductionBucket
LambdaFunctionAssociations:
- EventType: viewer-request
IncludeBody: false
LambdaFunctionARN: "arn:aws:lambda:us-east-1:156160966877:function:path_rewrite:7"
ForwardedValues: ForwardedValues:
QueryString: 'false' QueryString: 'false'
Cookies: Cookies:
...@@ -165,7 +169,7 @@ Resources: ...@@ -165,7 +169,7 @@ Resources:
LambdaFunctionAssociations: LambdaFunctionAssociations:
- EventType: viewer-request - EventType: viewer-request
IncludeBody: false IncludeBody: false
LambdaFunctionARN: "arn:aws:lambda:us-east-1:156160966877:function:path_rewrite:2" LambdaFunctionARN: "arn:aws:lambda:us-east-1:156160966877:function:path_rewrite:7"
ForwardedValues: ForwardedValues:
QueryString: true QueryString: true
Cookies: Cookies:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment