Skip to content

Commit

Permalink
fix: fix web component cors headers (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuong Vu authored May 14, 2020
1 parent 318c19b commit 5033678
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions packages/web-components/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ custom:
noFrozenLockFile: false
excludeFiles: src/**/*.test.ts
keepOutputDirectory: true
allowedHeaders:
- Content-Type
- X-Amz-Date
- Authorization
- X-Api-Key
- X-Amz-Security-Token
- X-Amz-User-Agent
- reapit-customer

provider:
name: aws
Expand Down Expand Up @@ -57,7 +65,10 @@ functions:
- http:
path: properties
method: get
cors: true
cors:
origin: '*'
headers: ${self:custom.allowedHeaders}
allowCredentials: false
private: true
request:
parameters:
Expand All @@ -68,7 +79,10 @@ functions:
- http:
path: properties/{id}
method: get
cors: true
cors:
origin: '*'
headers: ${self:custom.allowedHeaders}
allowCredentials: false
private: true
request:
parameters:
Expand All @@ -79,7 +93,10 @@ functions:
- http:
path: propertyImages
method: get
cors: true
cors:
origin: '*'
headers: ${self:custom.allowedHeaders}
allowCredentials: false
private: true
request:
parameters:
Expand Down

0 comments on commit 5033678

Please sign in to comment.