Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required API key in SAM template #239

Merged
merged 1 commit into from
May 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions middleware/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,34 +102,44 @@ Resources:
Ref: ByteShareAPIGW
Path: /health
Method: any
Auth:
ApiKeyRequired: true
UploadApi:
Type: Api
Properties:
RestApiId:
Ref: ByteShareAPIGW
Path: /upload/{proxy+}
Method: any
Auth:
ApiKeyRequired: true
DownloadApi:
Type: Api
Properties:
RestApiId:
Ref: ByteShareAPIGW
Path: /download/{proxy+}
Method: any
Auth:
ApiKeyRequired: true
FeedbackApi:
Type: Api
Properties:
RestApiId:
Ref: ByteShareAPIGW
Path: /feedback
Method: any
Auth:
ApiKeyRequired: true
SubscribeApi:
Type: Api
Properties:
RestApiId:
Ref: ByteShareAPIGW
Path: /subscribe
Method: any
Auth:
ApiKeyRequired: true
SecuredApi:
Type: Api
Properties:
Expand All @@ -139,6 +149,7 @@ Resources:
Method: any
Auth:
Authorizer: AWS_IAM
ApiKeyRequired: true
WebhookApi:
Type: Api
Properties:
Expand All @@ -159,6 +170,8 @@ Resources:
StageName: prod
OpenApiVersion: "3.0.0"
TracingEnabled: true
Auth:
ApiKeyRequired: true
Cors:
AllowMethods: "'OPTIONS,GET,POST,PUT,DELETE'"
AllowHeaders: "'Content-Type,X-Amz-Date,Authorization,x-api-key,X-Amz-Security-Token,File-Length,X-Auth-Token'"
Expand Down
Loading