Skip to content

Commit

Permalink
chore(docs): update cors documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
caiorcferreira authored and cupello committed Dec 3, 2020
1 parent 7f7478d commit 0f1888e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/restql/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,21 @@ You can use the `pprof` tool to investigate restQL performance. To enable it set
server:
middlewares:
cors:
allowOrigin: ${allowed_custom_origin}
allowMethods: ${allowed_custom_methods}
allowHeaders: ${allowed_custom_headers}
exposeHeaders: ${allowed_custom_expose_headers}
allowOrigin: "example.com, hero.api"
allowMethods: "GET, POST"
allowHeaders: "X-TID, X-Custom"
allowCredentials: false
exposeHeaders: "X-TID"
maxAge: 10 # seconds, as per specification
```
Or via environment variables:
```shell script
RESTQL_CORS_ALLOW_ORIGIN=${allowed_custom_origin}
RESTQL_CORS_ALLOW_METHODS=${allowed_custom_methods}
RESTQL_CORS_ALLOW_HEADERS=${allowed_custom_headers}
RESTQL_CORS_EXPOSE_HEADERS=${allowed_custom_expose_headers}
RESTQL_CORS_ALLOW_CREDENTIALS=${allowed_credentials}
RESTQL_CORS_MAX_AGE=${allowed_max_age}
```

### Http Client
Expand Down

0 comments on commit 0f1888e

Please sign in to comment.