Skip to content

Commit

Permalink
Patch method overwrite docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Nov 28, 2024
1 parent dc1b265 commit 0fe0ebe
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@ return [
Please keep in mind that this option makes your Kirby installation less secure.
</warning>

## PATCH method overwrite

<since v="4.5.0">
The `PATCH` method is not available in some shared hosting environments. Therefore, our API will accept `POST` requests instead of `PATCH` requests if the API request sends an `x-http-method-override` header. All Panel API requests will automatically use `POST` requests and the additional header by default to ensure the best possible compatibility with environments. You can check in the system view to see if your server supports native `PATCH` requests and disable method overwrites in your config.

```php
return [
'api' => [
'methodOverwrite' => false
]
];
```
</since>


## Custom API elements

Check out the (link: docs/reference/plugins/extensions/api text: API extension reference) to learn more about adding **custom API endpoints, models, collections or more**. Instead of using a plugin, you can add them to your config options in the same manner.
Expand Down

0 comments on commit 0fe0ebe

Please sign in to comment.