(Grav GitSync) Automatic Commit from smokephil
This commit is contained in:
parent
d73d0ba519
commit
96a01e3ab4
260 changed files with 25905 additions and 16011 deletions
|
|
@ -98,8 +98,8 @@ class GitSyncPlugin extends Plugin
|
|||
$secret = $config['webhook_secret'] ?? false;
|
||||
$enabled = $config['webhook_enabled'] ?? false;
|
||||
|
||||
if ($route === $webhook && $_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if ($secret && $enabled) {
|
||||
if ($enabled && $route === $webhook && $_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if ($secret) {
|
||||
if (!$this->isRequestAuthorized($secret)) {
|
||||
http_response_code(401);
|
||||
header('Content-Type: application/json');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue