|
4 | 4 | FrameworkBundle Configuration
|
5 | 5 | =============================
|
6 | 6 |
|
7 |
| -The FrameworkBundle includes the main framework configuration, from sessions and |
| 7 | +The FrameworkBundle defines the main framework configuration, from sessions and |
8 | 8 | translations to forms, validation, routing and more. All these options are
|
9 | 9 | configured under the ``framework`` key in your application configuration.
|
10 | 10 |
|
@@ -1482,6 +1482,143 @@ If this option is enabled, serialization groups can be defined using annotations
|
1482 | 1482 |
|
1483 | 1483 | For more information, see :ref:`serializer-using-serialization-groups-annotations`.
|
1484 | 1484 |
|
| 1485 | +Full Default Configuration |
| 1486 | +-------------------------- |
| 1487 | + |
| 1488 | +.. configuration-block:: |
| 1489 | + |
| 1490 | + .. code-block:: yaml |
| 1491 | +
|
| 1492 | + framework: |
| 1493 | + secret: ~ |
| 1494 | + http_method_override: true |
| 1495 | + trusted_proxies: [] |
| 1496 | + ide: ~ |
| 1497 | + test: ~ |
| 1498 | + default_locale: en |
| 1499 | +
|
| 1500 | + csrf_protection: |
| 1501 | + enabled: false |
| 1502 | + field_name: _token # Deprecated since 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead |
| 1503 | +
|
| 1504 | + # form configuration |
| 1505 | + form: |
| 1506 | + enabled: false |
| 1507 | + csrf_protection: |
| 1508 | + enabled: true |
| 1509 | + field_name: ~ |
| 1510 | +
|
| 1511 | + # esi configuration |
| 1512 | + esi: |
| 1513 | + enabled: false |
| 1514 | +
|
| 1515 | + # fragments configuration |
| 1516 | + fragments: |
| 1517 | + enabled: false |
| 1518 | + path: /_fragment |
| 1519 | +
|
| 1520 | + # profiler configuration |
| 1521 | + profiler: |
| 1522 | + enabled: false |
| 1523 | + collect: true |
| 1524 | + only_exceptions: false |
| 1525 | + only_master_requests: false |
| 1526 | + dsn: file:%kernel.cache_dir%/profiler |
| 1527 | + username: |
| 1528 | + password: |
| 1529 | + lifetime: 86400 |
| 1530 | + matcher: |
| 1531 | + ip: ~ |
| 1532 | +
|
| 1533 | + # use the urldecoded format |
| 1534 | + path: ~ # Example: ^/path to resource/ |
| 1535 | + service: ~ |
| 1536 | +
|
| 1537 | + # router configuration |
| 1538 | + router: |
| 1539 | + resource: ~ # Required |
| 1540 | + type: ~ |
| 1541 | + http_port: 80 |
| 1542 | + https_port: 443 |
| 1543 | +
|
| 1544 | + # * set to true to throw an exception when a parameter does not |
| 1545 | + # match the requirements |
| 1546 | + # * set to false to disable exceptions when a parameter does not |
| 1547 | + # match the requirements (and return null instead) |
| 1548 | + # * set to null to disable parameter checks against requirements |
| 1549 | + # |
| 1550 | + # 'true' is the preferred configuration in development mode, while |
| 1551 | + # 'false' or 'null' might be preferred in production |
| 1552 | + strict_requirements: true |
| 1553 | +
|
| 1554 | + # session configuration |
| 1555 | + session: |
| 1556 | + storage_id: session.storage.native |
| 1557 | + handler_id: session.handler.native_file |
| 1558 | + name: ~ |
| 1559 | + cookie_lifetime: ~ |
| 1560 | + cookie_path: ~ |
| 1561 | + cookie_domain: ~ |
| 1562 | + cookie_secure: ~ |
| 1563 | + cookie_httponly: ~ |
| 1564 | + gc_divisor: ~ |
| 1565 | + gc_probability: ~ |
| 1566 | + gc_maxlifetime: ~ |
| 1567 | + save_path: '%kernel.cache_dir%/sessions' |
| 1568 | +
|
| 1569 | + # serializer configuration |
| 1570 | + serializer: |
| 1571 | + enabled: false |
| 1572 | +
|
| 1573 | + # assets configuration |
| 1574 | + assets: |
| 1575 | + base_path: ~ |
| 1576 | + base_urls: [] |
| 1577 | + version: ~ |
| 1578 | + version_format: '%%s?%%s' |
| 1579 | + packages: |
| 1580 | +
|
| 1581 | + # Prototype |
| 1582 | + name: |
| 1583 | + base_path: ~ |
| 1584 | + base_urls: [] |
| 1585 | + version: ~ |
| 1586 | + version_format: '%%s?%%s' |
| 1587 | +
|
| 1588 | + # templating configuration |
| 1589 | + templating: |
| 1590 | + hinclude_default_template: ~ |
| 1591 | + form: |
| 1592 | + resources: |
| 1593 | +
|
| 1594 | + # Default: |
| 1595 | + - FrameworkBundle:Form |
| 1596 | + cache: ~ |
| 1597 | + engines: # Required |
| 1598 | +
|
| 1599 | + # Example: |
| 1600 | + - twig |
| 1601 | + loaders: [] |
| 1602 | +
|
| 1603 | + # translator configuration |
| 1604 | + translator: |
| 1605 | + enabled: false |
| 1606 | + fallbacks: [en] |
| 1607 | + logging: "%kernel.debug%" |
| 1608 | +
|
| 1609 | + # validation configuration |
| 1610 | + validation: |
| 1611 | + enabled: false |
| 1612 | + cache: ~ |
| 1613 | + enable_annotations: false |
| 1614 | + translation_domain: validators |
| 1615 | +
|
| 1616 | + # annotation configuration |
| 1617 | + annotations: |
| 1618 | + cache: file |
| 1619 | + file_cache_dir: '%kernel.cache_dir%/annotations' |
| 1620 | + debug: '%kernel.debug%' |
| 1621 | +
|
1485 | 1622 | .. _`HTTP Host header attacks`: http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html
|
1486 | 1623 | .. _`Security Advisory Blog post`: https://symfony.com/blog/security-releases-symfony-2-0-24-2-1-12-2-2-5-and-2-3-3-released#cve-2013-4752-request-gethost-poisoning
|
1487 | 1624 | .. _`Doctrine Cache`: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html
|
|
0 commit comments