Skip to content

Commit

Permalink
[core] Add hide swagger doc
Browse files Browse the repository at this point in the history
  • Loading branch information
allburov committed Nov 25, 2023
1 parent fdbaa43 commit fb8b146
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/site/content/en/docs/how-to/security/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Either protect the API with [Api Key](https://www.fortinet.com/resources/cybergl
firewalls.

## Swagger Security ![](/images/versions/plus.png)
### Username and password
If you want to hide the project Swagger panel under the password - run the following command to hide under `admin/admin`
login and password.

Expand All @@ -29,6 +30,12 @@ Open http://localhost:3000/ and enter `admin / admin` in the inputs:

{{< alert icon="👉" text="Protecting Swagger under the password does not protect your API from other request! Use both techniques to protect your API and Swagger!" />}}

### Disable Swagger
You also can hide swagger completely by setting `WHATSAPP_SWAGGER_ENABLED=false` environment variable.

{{< alert icon="👉" text="Disabling Swagger does not protect the API, please use API security as well" />}}


## API security ![](/images/versions/plus.png)

You can protect the API by requiring Api Key in a request's headers.
Expand Down
1 change: 1 addition & 0 deletions docs/site/content/en/docs/overview/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ You even can **subscribe to get new updates** there!

## 2023.11
November 2023
- Add `WHATSAPP_SWAGGER_ENABLED=false` so you can hide Swagger documentation (available only in Plus version). [#185](https://github.com/devlikeapro/whatsapp-http-api/issues/185)
- Add dedicated `media` field in webhook payload - now you can know which media is attached to the message.
```json
{
Expand Down

0 comments on commit fb8b146

Please sign in to comment.