Don't allow non-GET requests in demo mode
This commit is contained in:
parent
991c5cb87c
commit
e8c029186e
@ -16,6 +16,11 @@ function handle404() {
|
||||
}
|
||||
|
||||
function before() {
|
||||
if (defined('HESK_DEMO') && $_SERVER['REQUEST_METHOD'] !== 'GET') {
|
||||
print_error('Demo Mode', 'Only read-only commands are available in demo mode!', null, 401);
|
||||
die();
|
||||
}
|
||||
|
||||
$internalUse = \BusinessLogic\Helpers::getHeader('X-INTERNAL-CALL');
|
||||
|
||||
if ($internalUse === 'true') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user