hm-o2e-tool/config.php

47 lines
No EOL
1.4 KiB
PHP

<?php
// OMG Static - H&M Agent Configuration
// This file contains sensitive configuration data
// Should be placed outside web root or protected by Apache .htaccess
header('Content-Type: application/json');
// Prevent direct access if not called via AJAX
if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest') {
http_response_code(403);
exit('Access denied');
}
session_start();
if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] !== true) {
http_response_code(401);
exit(json_encode(['error' => 'Unauthorized']));
}
// Configuration data
$config = [
'api' => [
'baseUrl' => 'https://oliver.one2edit.com/Api.php',
'authDomain' => 'local',
'authUsername' => 'OMGStaticSite',
'authPassword' => 'OMG-25!',
'clientId' => '6'
],
'assets' => [
'inddProjectId' => '7',
'pdfProjectId' => '10',
'inddFolderIdentifier' => '68cc028b0e3f4a98ed07db6c',
'ratioCheckFolderIdentifier' => '68e7b8a3e7f97c8f0e01d8b1',
'pdfFolderIdentifier' => '686fac43868b7ed49b028bee',
'pdfPresetId' => '6',
'hmSRGBLogoAsset' => '68626a50da85f5bf560161ed',
'hmCMYKLogoAsset' => '68626a4a0eb4d535b80789cb'
],
'performance' => [
'relinkDelay' => 5000,
'documentDelay' => 2000,
'statusCheckDelay' => 500
]
];
echo json_encode($config);
?>