Fix date in Postman header
This commit is contained in:
parent
73d5fa79d7
commit
c10585da3f
@ -30,7 +30,7 @@ if (!defined('GNUSOCIAL')) {
|
||||
}
|
||||
|
||||
// Ensure proper timezone
|
||||
date_default_timezone_set('UTC');
|
||||
date_default_timezone_set('GMT');
|
||||
|
||||
// Import required files by the plugin
|
||||
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
|
@ -55,9 +55,9 @@ class apInboxAction extends ManagedAction
|
||||
ActivityPubReturn::error('Only POST requests allowed.');
|
||||
}
|
||||
|
||||
common_debug('ActivityPub Shared Inbox: Received a POST request.');
|
||||
common_debug('ActivityPub Inbox: Received a POST request.');
|
||||
$data = file_get_contents('php://input');
|
||||
common_debug('ActivityPub Shared Inbox: Request contents: '.$data);
|
||||
common_debug('ActivityPub Inbox: Request contents: '.$data);
|
||||
$data = json_decode(file_get_contents('php://input'), true);
|
||||
|
||||
try {
|
||||
|
@ -80,7 +80,7 @@ class Activitypub_postman
|
||||
'content-type' => 'application/activity+json',
|
||||
'accept' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
|
||||
'user-agent' => 'GNUSocialBot v0.1 - https://gnu.io/social',
|
||||
'date' => date('D, d M Y h:i:s') . ' GMT'
|
||||
'date' => gmdate('D, d M Y H:i:s \G\M\T', time())
|
||||
];
|
||||
|
||||
$handlerStack = GuzzleHttpSignatures::defaultHandlerFromContext($context);
|
||||
|
Reference in New Issue
Block a user