Skip to content

Commit 62ce220

Browse files
committed
Use the reserved domains example.com and example.org
1 parent 9fb296d commit 62ce220

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

contributing/documentation/standards.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Code Examples
5757
Unless the example requires a custom bundle, make sure to always use the
5858
``AppBundle`` bundle to store your code;
5959
* Use ``Acme`` when the code requires a vendor name;
60+
* Use ``example.com`` as the domain of sample URLs and ``example.org`` when a
61+
second domain is required. Both domains are `reserved by the IANA`_.
6062
* To avoid horizontal scrolling on code blocks, we prefer to break a line
6163
correctly if it crosses the 85th character;
6264
* When you fold one or more lines of code, place ``...`` in a comment at the point
@@ -174,6 +176,7 @@ In addition, documentation follows these rules:
174176

175177
.. _`the Sphinx documentation`: http://sphinx-doc.org/rest.html#source-code
176178
.. _`Twig Coding Standards`: http://twig.sensiolabs.org/doc/coding_standards.html
179+
.. _`reserved by the IANA`: http://www.iana.org/domains/reserved
177180
.. _`American English`: http://en.wikipedia.org/wiki/American_English
178181
.. _`American English Oxford Dictionary`: http://www.oxforddictionaries.com/definition/american_english/
179182
.. _`headings and titles`: http://en.wikipedia.org/wiki/Letter_case#Headings_and_publication_titles

reference/configuration/framework.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ respond and the user will receive a 500 response.
283283
284284
# app/config/config.yml
285285
framework:
286-
trusted_hosts: ['acme.com', 'acme.org']
286+
trusted_hosts: ['example.com', 'example.org']
287287
288288
.. code-block:: xml
289289
@@ -296,8 +296,8 @@ respond and the user will receive a 500 response.
296296
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
297297
298298
<framework:config>
299-
<trusted-host>acme.com</trusted-host>
300-
<trusted-host>acme.org</trusted-host>
299+
<trusted-host>example.com</trusted-host>
300+
<trusted-host>example.org</trusted-host>
301301
<!-- ... -->
302302
</framework>
303303
</container>
@@ -306,17 +306,17 @@ respond and the user will receive a 500 response.
306306
307307
// app/config/config.php
308308
$container->loadFromExtension('framework', array(
309-
'trusted_hosts' => array('acme.com', 'acme.org'),
309+
'trusted_hosts' => array('example.com', 'example.org'),
310310
));
311311
312-
Hosts can also be configured using regular expressions (e.g. ``.*\.?acme.com$``),
312+
Hosts can also be configured using regular expressions (e.g. ``.*\.?example.com$``),
313313
which make it easier to respond to any subdomain.
314314

315315
In addition, you can also set the trusted hosts in the front controller
316316
using the ``Request::setTrustedHosts()`` method::
317317

318318
// web/app.php
319-
Request::setTrustedHosts(array('.*\.?acme.com$', '.*\.?acme.org$'));
319+
Request::setTrustedHosts(array('.*\.?example.com$', '.*\.?example.org$'));
320320

321321
The default value for this option is an empty array, meaning that the application
322322
can respond to any given host.

0 commit comments

Comments
 (0)