the upload tree, and public form submissions are size-bounded and rate-limited
18 lines
489 B
PHP
18 lines
489 B
PHP
<?php
|
|
|
|
$handler = new \Plugi\Extensions\Form\SubmissionHandler();
|
|
$rawData = file_get_contents(
|
|
'php://input',
|
|
false,
|
|
null,
|
|
0,
|
|
\Plugi\Extensions\Form\SubmissionHandler::MAX_REQUEST_BYTES + 1
|
|
);
|
|
$result = $handler->handle($_GET['id'] ?? null, is_string($rawData) ? $rawData : '');
|
|
|
|
http_response_code($result['status']);
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
echo json_encode($result['body'], JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE);
|
|
|
|
|