Skip to content

Commit

Permalink
docs(AWS HTTP API): Fix headers
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Feb 26, 2020
1 parent 69afca5 commit 22364b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/providers/aws/events/http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ functions:
path: /get/for/any/{param}
```

## CORS Setup
### CORS Setup

With HTTP API we may configure CORS headers that'll be effective for all configured endpoints.

Expand Down Expand Up @@ -104,15 +104,15 @@ provider:
maxAge: 6000 # In seconds
```

## JWT Authorizers
### JWT Authorizers

Currently the only way to restrict access to configured HTTP API endpoints is by setting up an JWT Authorizers.

_For deep details on that follow [AWS documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-jwt-authorizer.html)_

To ensure endpoints (as configured in `serverless.yml`) are backed with authorizers, follow below steps.

### 1. Configure authorizers on `provider.httpApi.authorizers`
#### 1. Configure authorizers on `provider.httpApi.authorizers`

```yaml
provider:
Expand All @@ -126,7 +126,7 @@ provider:
- ${client2Id}
```

### 2. Configure endpoints which are expected to have restricted access:
#### 2. Configure endpoints which are expected to have restricted access:

```yaml
functions:
Expand All @@ -143,7 +143,7 @@ functions:
- user.email
```

## Access logs
### Access logs

Deployed stage can have acess logging enabled, for that just turn on logs for HTTP API in provider settings as follows:

Expand Down

0 comments on commit 22364b8

Please sign in to comment.