From 2f86dd9c73147543e0e98a56333d47d80f7301ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 22 Aug 2023 13:35:27 +0200 Subject: [PATCH] Fix API token generation --- app/config/config.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index b31b29e0d..04607b68c 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -84,13 +84,8 @@ doctrine_migrations: executed_at_column_name: 'executed_at' fos_rest: - zone: - - { path: ^/api } - - { path: ^/annotations } param_fetcher_listener: true body_listener: true - exception: - serializer_error_renderer: true view: mime_types: csv: @@ -119,6 +114,9 @@ fos_rest: - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: json, prefer_extension: false } - { path: "^/api", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false } - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false } + # for an unknown reason, EACH REQUEST goes to FOS\RestBundle\EventListener\FormatListener + # so we need to add custom rule for custom api export but also for all other routes of the application... + - { path: '^/', priorities: ['text/html', '*/*'], fallback_format: html, prefer_extension: false } nelmio_api_doc: areas: