From 0bacc9e175d57676bf23348cf039cb3f214dfb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 30 Dec 2016 13:23:02 +0100 Subject: [PATCH] Fixed API error 'No matching accepted Response format could be determined' --- app/config/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index 591b5294a..05c82e434 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -148,9 +148,9 @@ fos_rest: format_listener: enabled: true rules: - - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: false, prefer_extension: false } - - { path: "^/api", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } - - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } + - { 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 }