feat: Add User-Agent header to Allegro API requests
- Implemented buildUserAgent() method in AllegroApiClient, AllegroOAuthClient, and AllegroTrackingService to include User-Agent header in all HTTP requests to Allegro API. - Updated .env.example to include APP_VERSION and ALLEGRO_USER_AGENT_URL for configuration. - Created public /info page to provide application details required by Allegro, including app name, version, description, and contact information. - Added minimalist layout for public pages to ensure a professional appearance. - Ensured all changes comply with Allegro's API requirements for User-Agent header.
This commit is contained in:
@@ -72,6 +72,7 @@ use App\Modules\Printing\PrintApiController;
|
||||
use App\Modules\Printing\PrintApiKeyRepository;
|
||||
use App\Modules\Printing\PrintJobRepository;
|
||||
use App\Modules\Settings\PrintSettingsController;
|
||||
use App\Modules\Info\InfoController;
|
||||
use App\Modules\Users\UsersController;
|
||||
|
||||
return static function (Application $app): void {
|
||||
@@ -392,6 +393,9 @@ return static function (Application $app): void {
|
||||
}
|
||||
};
|
||||
|
||||
$infoController = new InfoController($template);
|
||||
$router->get('/info', [$infoController, 'show']);
|
||||
|
||||
$router->get('/health', static fn (Request $request): Response => Response::json([
|
||||
'status' => 'ok',
|
||||
'app' => (string) $app->config('app.name', 'orderPRO'),
|
||||
|
||||
Reference in New Issue
Block a user