]> git.immae.eu Git - github/wallabag/wallabag.git/blob - app/config/config.yml
Merge pull request #4151 from ldidry/fix-4060
[github/wallabag/wallabag.git] / app / config / config.yml
1 imports:
2 - { resource: parameters.yml }
3 - { resource: security.yml }
4 - { resource: services.yml }
5 - { resource: wallabag.yml }
6
7 parameters:
8 # Allows to use the live reload feature for changes in assets
9 use_webpack_dev_server: false
10 craue_config.cache_adapter.class: Craue\ConfigBundle\CacheAdapter\SymfonyCacheComponentAdapter
11
12 framework:
13 #esi: ~
14 translator:
15 enabled: true
16 fallback: "%locale%"
17 secret: "%secret%"
18 router:
19 resource: "%kernel.project_dir%/app/config/routing.yml"
20 strict_requirements: ~
21 form: ~
22 csrf_protection: ~
23 validation:
24 enable_annotations: true
25 templating:
26 engines: ['twig']
27 default_locale: "%locale%"
28 trusted_hosts: ~
29 session:
30 # handler_id set to null will use default session handler from php.ini
31 handler_id: session.handler.native_file
32 save_path: "%kernel.project_dir%/var/sessions/%kernel.environment%"
33 fragments: ~
34 http_method_override: true
35 assets: ~
36
37 # Twig Configuration
38 twig:
39 debug: "%kernel.debug%"
40 strict_variables: "%kernel.debug%"
41 form_themes:
42 - "LexikFormFilterBundle:Form:form_div_layout.html.twig"
43 exception_controller: wallabag_core.exception_controller:showAction
44
45 # Doctrine Configuration
46 doctrine:
47 dbal:
48 driver: "%database_driver%"
49 host: "%database_host%"
50 port: "%database_port%"
51 dbname: "%database_name%"
52 user: "%database_user%"
53 password: "%database_password%"
54 charset: "%database_charset%"
55 path: "%database_path%"
56 unix_socket: "%database_socket%"
57
58 orm:
59 auto_generate_proxy_classes: "%kernel.debug%"
60 entity_managers:
61 default:
62 auto_mapping: true
63
64 stof_doctrine_extensions:
65 default_locale: "%locale%"
66 translation_fallback: true
67 orm:
68 default:
69 tree: true
70 sluggable: true
71
72 doctrine_migrations:
73 dir_name: "%kernel.project_dir%/app/DoctrineMigrations"
74 namespace: Application\Migrations
75 table_name: migration_versions
76 name: Application Migrations
77
78 # Swiftmailer Configuration
79 swiftmailer:
80 transport: "%mailer_transport%"
81 username: "%mailer_user%"
82 password: "%mailer_password%"
83 host: "%mailer_host%"
84 port: "%mailer_port%"
85 encryption: "%mailer_encryption%"
86 auth_mode: "%mailer_auth_mode%"
87 spool:
88 type: memory
89
90 fos_rest:
91 param_fetcher_listener: true
92 body_listener: true
93 view:
94 mime_types:
95 csv:
96 - 'text/csv'
97 - 'text/plain'
98 pdf:
99 - 'application/pdf'
100 epub:
101 - 'application/epub+zip'
102 mobi:
103 - 'application/x-mobipocket-ebook'
104 view_response_listener: 'force'
105 formats:
106 xml: true
107 json: true
108 txt: true
109 csv: true
110 pdf: true
111 epub: true
112 mobi: true
113 templating_formats:
114 html: false
115 force_redirects:
116 html: true
117 failed_validation: HTTP_BAD_REQUEST
118 default_engine: twig
119 routing_loader:
120 default_format: json
121 format_listener:
122 enabled: true
123 rules:
124 - { path: "^/api/entries/([0-9]+)/export.(.*)", priorities: ['epub', 'mobi', 'pdf', 'txt', 'csv'], fallback_format: json, prefer_extension: false }
125 - { path: "^/api", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false }
126 - { path: "^/annotations", priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false }
127 # for an unknown reason, EACH REQUEST goes to FOS\RestBundle\EventListener\FormatListener
128 # so we need to add custom rule for custom api export but also for all other routes of the application...
129 - { path: '^/', priorities: ['text/html', '*/*'], fallback_format: html, prefer_extension: false }
130
131 nelmio_api_doc:
132 sandbox:
133 enabled: false
134 cache:
135 enabled: true
136 name: wallabag API documentation
137
138 nelmio_cors:
139 defaults:
140 allow_credentials: false
141 allow_origin: []
142 allow_headers: []
143 allow_methods: []
144 expose_headers: []
145 max_age: 0
146 hosts: []
147 #origin_regex: false
148 paths:
149 '^/api/':
150 allow_origin: ['*']
151 allow_headers: ['Authorization','content-type']
152 allow_methods: ['POST', 'PUT', 'PATCH','GET', 'DELETE']
153 max_age: 3600
154 '^/oauth/':
155 allow_origin: ['*']
156 allow_headers: ['Authorization','content-type']
157 allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
158 max_age: 3600
159 '^/':
160 #origin_regex: true
161 allow_origin: ['*']
162 allow_headers: ['Authorization','content-type']
163 allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
164 max_age: 3600
165 hosts: ['^api\.']
166
167 liip_theme:
168 load_controllers: false
169 themes:
170 - baggy
171 - material
172 autodetect_theme: wallabag_core.helper.detect_active_theme
173
174 path_patterns:
175 bundle_resource:
176 - "%%bundle_path%%/Resources/views/themes/%%current_theme%%/%%template%%"
177
178 fos_user:
179 db_driver: orm
180 firewall_name: secured_area
181 user_class: Wallabag\UserBundle\Entity\User
182 registration:
183 confirmation:
184 enabled: "%fosuser_confirmation%"
185 from_email:
186 address: "%from_email%"
187 sender_name: wallabag
188
189 fos_oauth_server:
190 db_driver: orm
191 client_class: Wallabag\ApiBundle\Entity\Client
192 access_token_class: Wallabag\ApiBundle\Entity\AccessToken
193 refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken
194 auth_code_class: Wallabag\ApiBundle\Entity\AuthCode
195 service:
196 user_provider: fos_user.user_provider.username_email
197 options:
198 refresh_token_lifetime: 1209600
199
200 scheb_two_factor:
201 trusted_device:
202 enabled: true
203 cookie_name: wllbg_trusted_computer
204 lifetime: 2592000
205
206 backup_codes:
207 enabled: "%twofactor_auth%"
208
209 google:
210 enabled: "%twofactor_auth%"
211 template: WallabagUserBundle:Authentication:form.html.twig
212
213 email:
214 enabled: "%twofactor_auth%"
215 sender_email: "%twofactor_sender%"
216 digits: 6
217 template: WallabagUserBundle:Authentication:form.html.twig
218 mailer: wallabag_user.auth_code_mailer
219
220 kphoen_rulerz:
221 targets:
222 doctrine: true
223
224 old_sound_rabbit_mq:
225 connections:
226 default:
227 host: "%rabbitmq_host%"
228 port: "%rabbitmq_port%"
229 user: "%rabbitmq_user%"
230 password: "%rabbitmq_password%"
231 vhost: /
232 lazy: true
233 producers:
234 import_pocket:
235 connection: default
236 exchange_options:
237 name: 'wallabag.import.pocket'
238 type: topic
239 import_readability:
240 connection: default
241 exchange_options:
242 name: 'wallabag.import.readability'
243 type: topic
244 import_pinboard:
245 connection: default
246 exchange_options:
247 name: 'wallabag.import.pinboard'
248 type: topic
249 import_instapaper:
250 connection: default
251 exchange_options:
252 name: 'wallabag.import.instapaper'
253 type: topic
254 import_wallabag_v1:
255 connection: default
256 exchange_options:
257 name: 'wallabag.import.wallabag_v1'
258 type: topic
259 import_wallabag_v2:
260 connection: default
261 exchange_options:
262 name: 'wallabag.import.wallabag_v2'
263 type: topic
264 import_elcurator:
265 connection: default
266 exchange_options:
267 name: 'wallabag.import.elcurator'
268 type: topic
269 import_firefox:
270 connection: default
271 exchange_options:
272 name: 'wallabag.import.firefox'
273 type: topic
274 import_chrome:
275 connection: default
276 exchange_options:
277 name: 'wallabag.import.chrome'
278 type: topic
279 consumers:
280 import_pocket:
281 connection: default
282 exchange_options:
283 name: 'wallabag.import.pocket'
284 type: topic
285 queue_options:
286 name: 'wallabag.import.pocket'
287 callback: wallabag_import.consumer.amqp.pocket
288 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
289 import_readability:
290 connection: default
291 exchange_options:
292 name: 'wallabag.import.readability'
293 type: topic
294 queue_options:
295 name: 'wallabag.import.readability'
296 callback: wallabag_import.consumer.amqp.readability
297 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
298 import_instapaper:
299 connection: default
300 exchange_options:
301 name: 'wallabag.import.instapaper'
302 type: topic
303 queue_options:
304 name: 'wallabag.import.instapaper'
305 callback: wallabag_import.consumer.amqp.instapaper
306 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
307 import_pinboard:
308 connection: default
309 exchange_options:
310 name: 'wallabag.import.pinboard'
311 type: topic
312 queue_options:
313 name: 'wallabag.import.pinboard'
314 callback: wallabag_import.consumer.amqp.pinboard
315 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
316 import_wallabag_v1:
317 connection: default
318 exchange_options:
319 name: 'wallabag.import.wallabag_v1'
320 type: topic
321 queue_options:
322 name: 'wallabag.import.wallabag_v1'
323 callback: wallabag_import.consumer.amqp.wallabag_v1
324 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
325 import_wallabag_v2:
326 connection: default
327 exchange_options:
328 name: 'wallabag.import.wallabag_v2'
329 type: topic
330 queue_options:
331 name: 'wallabag.import.wallabag_v2'
332 callback: wallabag_import.consumer.amqp.wallabag_v2
333 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
334 import_elcurator:
335 connection: default
336 exchange_options:
337 name: 'wallabag.import.elcurator'
338 type: topic
339 queue_options:
340 name: 'wallabag.import.elcurator'
341 callback: wallabag_import.consumer.amqp.elcurator
342 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
343 import_firefox:
344 connection: default
345 exchange_options:
346 name: 'wallabag.import.firefox'
347 type: topic
348 queue_options:
349 name: 'wallabag.import.firefox'
350 callback: wallabag_import.consumer.amqp.firefox
351 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
352 import_chrome:
353 connection: default
354 exchange_options:
355 name: 'wallabag.import.chrome'
356 type: topic
357 queue_options:
358 name: 'wallabag.import.chrome'
359 callback: wallabag_import.consumer.amqp.chrome
360 qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
361
362 fos_js_routing:
363 routes_to_expose:
364 - homepage
365 - starred
366 - archive
367 - all
368 - tag
369 - config
370 - import
371 - developer
372 - howto
373 - fos_user_security_logout
374 - new
375
376 jms_serializer:
377 handlers:
378 # to be removed if we switch to (default) ISO8601 datetime instead of ATOM
379 # see: https://github.com/schmittjoh/JMSSerializerBundle/pull/494
380 datetime:
381 default_format: "Y-m-d\\TH:i:sO" # ATOM
382
383 # see https://github.com/symfony/symfony-standard/pull/1133
384 sensio_framework_extra:
385 router:
386 annotations: false
387
388 httplug:
389 clients:
390 wallabag_core:
391 factory: 'wallabag_core.http_client_factory'
392 config:
393 defaults:
394 timeout: 10
395 plugins: ['httplug.plugin.logger']
396 wallabag_core.entry.download_images:
397 factory: 'httplug.factory.auto'
398 plugins: ['httplug.plugin.logger']
399 wallabag_import.pocket.client:
400 factory: 'httplug.factory.auto'
401 plugins:
402 - 'httplug.plugin.logger'
403 - header_defaults:
404 headers:
405 'content-type': 'application/json'
406 'X-Accept': 'application/json'
407 discovery:
408 client: false
409
410 # define custom entity so we can override length attribute to fix utf8mb4 issue
411 craue_config:
412 entity_name: Wallabag\CoreBundle\Entity\InternalSetting