fc2288c2fc
- fixed gone_re php regexes - better nav header layout - follow page instead of direct RSS link - logger in settings for nasg instead of direct logging - prism.js only for articles with language code blocks - added webmention.io webhook to email template
17 lines
457 B
PHP
17 lines
457 B
PHP
<?php
|
|
|
|
$raw = file_get_contents("php://input");
|
|
try {
|
|
$payload = json_decode($raw, TRUE);
|
|
} catch (Exception $e) {
|
|
header('HTTP/1.1 422 Unprocessable Entity');
|
|
die('Unprocessable Entity');
|
|
}
|
|
|
|
if(! isset($payload['secret']) || $payload['secret'] != '{{ callback_secret }}' ) {
|
|
header('HTTP/1.1 400 Bad Request');
|
|
die('Bad Request');
|
|
}
|
|
|
|
mail("{{ author.email }}", "[webmention] {$payload['source']}", $raw);
|
|
header('HTTP/1.1 202 Accepted');
|