logging in/out request

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/134/head
Maxence Lange 2018-12-04 22:46:04 -01:00 zatwierdzone przez Julius Härtl
rodzic 3d2fe11cd3
commit 374f312102
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4C614C6ED2CDE6DF
2 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -170,7 +170,7 @@ class ActivityPubController extends Controller {
try {
$body = file_get_contents('php://input');
$this->miscService->log('Shared Inbox: ' . $body, 0);
$this->miscService->log('[<<] shared-inbox: ' . $body, 1);
$origin = $this->activityService->checkRequest($this->request);
@ -205,7 +205,7 @@ class ActivityPubController extends Controller {
try {
$body = file_get_contents('php://input');
$this->miscService->log('Inbox: ' . $body, 0);
$this->miscService->log('[<<] inbox: ' . $body, 1);
$origin = $this->activityService->checkRequest($this->request);

Wyświetl plik

@ -76,6 +76,7 @@ class CurlService {
* @throws Request410Exception
*/
public function request(Request $request): array {
$curl = $this->initRequest($request);
$this->initRequestPost($curl, $request);
@ -105,10 +106,17 @@ class CurlService {
$ret['_path'] = $request->getUrl();
$ret['_code'] = $code;
$this->miscService->log(
'[>>] request: ' . json_encode($request) . ' - result: ' . json_encode($ret), 1
);
return $ret;
}
/**
* @param Request $request
*/
public function assignUserAgent(Request $request) {
$request->setUserAgent(
self::USER_AGENT . ' ' . $this->configService->getAppValue('installed_version')