Skip to content

Commit 17e52ef

Browse files
authored
Merge pull request #2 from smalruby/feature/update-sam-template-options-cors
feat: update SAM template OPTIONS routing and memory allocation
2 parents ea7b03f + 30523c1 commit 17e52ef

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

template.yaml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,14 @@ Resources:
2929
Handler: lambda_function.lambda_handler
3030
CodeUri: lambda/smalruby-cors-proxy/
3131
Description: General-purpose CORS proxy for Smalruby
32+
MemorySize: 512
3233
Events:
3334
CorsProxyGet:
3435
Type: Api
3536
Properties:
3637
RestApiId: !Ref SmalrubyApiGateway
3738
Path: /cors-proxy
3839
Method: GET
39-
CorsProxyOptions:
40-
Type: Api
41-
Properties:
42-
RestApiId: !Ref SmalrubyApiGateway
43-
Path: /cors-proxy
44-
Method: OPTIONS
4540

4641
SmalrubyMeshZoneGetFunction:
4742
Type: AWS::Serverless::Function
@@ -74,12 +69,6 @@ Resources:
7469
RestApiId: !Ref SmalrubyApiGateway
7570
Path: /scratch-api-proxy/translate
7671
Method: GET
77-
TranslateOptions:
78-
Type: Api
79-
Properties:
80-
RestApiId: !Ref SmalrubyApiGateway
81-
Path: /scratch-api-proxy/translate
82-
Method: OPTIONS
8372

8473
SmalrubyGetProjectInfoFunction:
8574
Type: AWS::Serverless::Function
@@ -96,12 +85,6 @@ Resources:
9685
RestApiId: !Ref SmalrubyApiGateway
9786
Path: /scratch-api-proxy/projects/{projectId}
9887
Method: GET
99-
ProjectInfoOptions:
100-
Type: Api
101-
Properties:
102-
RestApiId: !Ref SmalrubyApiGateway
103-
Path: /scratch-api-proxy/projects/{projectId}
104-
Method: OPTIONS
10588

10689
CorsForSmalrubyFunction:
10790
Type: AWS::Serverless::Function
@@ -111,6 +94,31 @@ Resources:
11194
Handler: lambda_function.lambda_handler
11295
CodeUri: lambda/cors-for-smalruby/
11396
Description: CORS handler for Smalruby
97+
Events:
98+
CorsProxyOptions:
99+
Type: Api
100+
Properties:
101+
RestApiId: !Ref SmalrubyApiGateway
102+
Path: /cors-proxy
103+
Method: OPTIONS
104+
MeshDomainOptions:
105+
Type: Api
106+
Properties:
107+
RestApiId: !Ref SmalrubyApiGateway
108+
Path: /mesh-domain
109+
Method: OPTIONS
110+
TranslateOptions:
111+
Type: Api
112+
Properties:
113+
RestApiId: !Ref SmalrubyApiGateway
114+
Path: /scratch-api-proxy/translate
115+
Method: OPTIONS
116+
ProjectInfoOptions:
117+
Type: Api
118+
Properties:
119+
RestApiId: !Ref SmalrubyApiGateway
120+
Path: /scratch-api-proxy/projects/{projectId}
121+
Method: OPTIONS
114122

115123
# API Gateway
116124
SmalrubyApiGateway:

0 commit comments

Comments
 (0)