Cross origin request handling for REST server in nwaku (#175)
This commit is contained in:
parent
cfa2c623e2
commit
f0a6aca9e2
|
@ -119,6 +119,7 @@ Here are the available node configuration options, along with their default valu
|
|||
| `rest-relay-cache-capacity` | `30` | Capacity of the Relay REST API message cache |
|
||||
| `rest-admin` | `false` | Enable access to REST HTTP Admin API: true\|false |
|
||||
| `rest-private` | `false` | Enable access to REST HTTP Private API: true\|false |
|
||||
| `rest-allow-origin` | | Allow cross-origin requests from the specified origin. When using the REST API in a browser, specify the origin host to get a valid response from the node REST HTTP server. This option may be repeated and can contain wildcards (?,\*) for defining URLs and ports such as `localhost:*`, `127.0.0.1:8080`, or allow any website with `*` |
|
||||
|
||||
## Metrics config
|
||||
|
||||
|
|
|
@ -96,8 +96,7 @@ curl --location 'http://127.0.0.1:8645/relay/v1/auto/messages' \
|
|||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"payload": "'$(echo -n "Hello Waku Network - from Anonymous User" | base64)'",
|
||||
"contentTopic": "/my-app/2/chatroom-1/proto",
|
||||
"timestamp":'$(date +%s)'
|
||||
"contentTopic": "/my-app/2/chatroom-1/proto"
|
||||
}'
|
||||
```
|
||||
|
||||
|
@ -110,4 +109,4 @@ curl --location 'http://127.0.0.1:8645/store/v1/messages?contentTopics=%2Fmy-app
|
|||
|
||||
:::tip Congratulations!
|
||||
You have successfully started a `nwaku` node with `RLN` enabled using Docker Compose. Have a look at the [Node Configuration Examples](/guides/nwaku/configure-nwaku) and [Advanced Configuration](https://github.com/waku-org/nwaku-compose/blob/master/ADVANCED.md) guides to learn how to configure `nwaku` for different use cases.
|
||||
:::
|
||||
:::
|
||||
|
|
Loading…
Reference in New Issue