diff options
Diffstat (limited to 'app/config/config.yml')
-rw-r--r-- | app/config/config.yml | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/app/config/config.yml b/app/config/config.yml index a56cbdd9..dfb0e3b2 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -76,7 +76,7 @@ doctrine: | |||
76 | dbname: "%database_name%" | 76 | dbname: "%database_name%" |
77 | user: "%database_user%" | 77 | user: "%database_user%" |
78 | password: "%database_password%" | 78 | password: "%database_password%" |
79 | charset: UTF8 | 79 | charset: "%database_charset%" |
80 | path: "%database_path%" | 80 | path: "%database_path%" |
81 | unix_socket: "%database_socket%" | 81 | unix_socket: "%database_socket%" |
82 | server_version: 5.6 | 82 | server_version: 5.6 |
@@ -113,12 +113,26 @@ swiftmailer: | |||
113 | fos_rest: | 113 | fos_rest: |
114 | param_fetcher_listener: true | 114 | param_fetcher_listener: true |
115 | body_listener: true | 115 | body_listener: true |
116 | format_listener: true | ||
117 | view: | 116 | view: |
117 | mime_types: | ||
118 | csv: | ||
119 | - 'text/csv' | ||
120 | - 'text/plain' | ||
121 | pdf: | ||
122 | - 'application/pdf' | ||
123 | epub: | ||
124 | - 'application/epub+zip' | ||
125 | mobi: | ||
126 | - 'application/x-mobipocket-ebook' | ||
118 | view_response_listener: 'force' | 127 | view_response_listener: 'force' |
119 | formats: | 128 | formats: |
120 | xml: true | 129 | xml: true |
121 | json : true | 130 | json: true |
131 | txt: true | ||
132 | csv: true | ||
133 | pdf: true | ||
134 | epub: true | ||
135 | mobi: true | ||
122 | templating_formats: | 136 | templating_formats: |
123 | html: true | 137 | html: true |
124 | force_redirects: | 138 | force_redirects: |
@@ -127,10 +141,21 @@ fos_rest: | |||
127 | default_engine: twig | 141 | default_engine: twig |
128 | routing_loader: | 142 | routing_loader: |
129 | default_format: json | 143 | default_format: json |
144 | format_listener: | ||
145 | enabled: true | ||
146 | rules: | ||
147 | - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: false, prefer_extension: false } | ||
148 | - { path: "^/api", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } | ||
149 | - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: false, prefer_extension: false } | ||
150 | # for an unknown reason, EACH REQUEST goes to FOS\RestBundle\EventListener\FormatListener | ||
151 | # so we need to add custom rule for custom api export but also for all other routes of the application... | ||
152 | - { path: '^/', priorities: ['text/html', '*/*'], fallback_format: html, prefer_extension: false } | ||
130 | 153 | ||
131 | nelmio_api_doc: | 154 | nelmio_api_doc: |
132 | sandbox: | 155 | sandbox: |
133 | enabled: false | 156 | enabled: false |
157 | cache: | ||
158 | enabled: true | ||
134 | name: wallabag API documentation | 159 | name: wallabag API documentation |
135 | 160 | ||
136 | nelmio_cors: | 161 | nelmio_cors: |