[core] Add hide swagger doc
This commit is contained in:
1 parent
fdbaa43ec9
commit
fb8b146bc4
2 files changed
+8
No files matched your search
@@ -16,6 +16,7 @@ Either protect the API with [Api Key](https://www.fortinet.com/resources/cybergl
|
||||
firewalls.
|
||||
|
||||
## Swagger Security 
|
||||
### 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.
|
||||
|
||||
@@ -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 
|
||||
|
||||
You can protect the API by requiring Api Key in a request's headers.
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user