Skip to content

Commit

Permalink
Add routes in api gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sumi-k committed Feb 15, 2024
1 parent 4ed5618 commit ef3d740
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-frontend-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ jobs:
no-fail-on-empty-changeset: "1"
parameter-overrides: >-
EnvName=dev,
ZipFileName=canopas_website_SSR_dev_${{ github.sha }}-${{ github.run_attempt }}.zip
ZipFileName=canopas_website_SSR_dev_${{ github.sha }}-${{ github.run_attempt }}.zip,
CloudfrontURL=${{ secrets.CLOUDFRONT_URL_VALUE_DEV }}
3 changes: 2 additions & 1 deletion .github/workflows/deploy-frontend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ jobs:
no-fail-on-empty-changeset: "1"
parameter-overrides: >-
EnvName=prod,
ZipFileName=canopas_website_SSR_prod_${{ github.sha }}-${{ github.run_attempt }}.zip
ZipFileName=canopas_website_SSR_prod_${{ github.sha }}-${{ github.run_attempt }}.zip,
CloudfrontURL=${{ secrets.CLOUDFRONT_URL_VALUE_PROD }}
26 changes: 26 additions & 0 deletions infrastructure/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Parameters:
ZipFileName:
Type: String
Description: Name of the zip file.
CloudfrontURL:
Type: String
Description: Cloudfront URL.

Resources:
HttpApi:
Expand All @@ -27,6 +30,29 @@ Resources:
Fn::Sub: canopas-website-ssr-frontend-${EnvName}
Description:
Fn::Sub: Canopas Website SSR Frontend API ${EnvName}
DefinitionBody:
openapi: "3.0.1"
info:
title:
Fn::Sub: canopas-website-ssr-frontend-${EnvName}
version: "1.0"
paths:
/sitemap.xml:
any:
x-amazon-apigateway-integration:
uri:
Fn::Sub: "${CloudfrontURL}/sitemap.xml"
httpMethod: "ANY"
/robots.txt:
any:
x-amazon-apigateway-integration:
uri: "${CloudfrontURL}/robots.txt"
httpMethod: "ANY"
/apple-touch-icon.png:
any:
x-amazon-apigateway-integration:
uri: "${CloudfrontURL}/apple-touch-icon.png"
httpMethod: "ANY"

HttpApiFunction:
Type: AWS::Serverless::Function
Expand Down

0 comments on commit ef3d740

Please sign in to comment.