Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit f862e09

Browse files
authored
Merge pull request #42 from tucksaun/wildcard-routes-doc-improvement
Be more precise in wildcard routes documentation
2 parents 45bfe41 + 587273c commit f862e09

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

cookbooks/go_live.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ layer to route requests to the project for a specific domain:
7878
7979
.. tip::
8080

81-
Multiple domains can be attached to a project. Wildcard domains (like
82-
``*.example.com``) are also supported.
81+
Multiple domains can be attached to a project. :ref:`wildcard_routes` (like
82+
``*.example.com``) are also supported using the ``.symfony/routes.yaml``
83+
file.
8384

8485
If you require access to the project before the domain name switch is done, you
8586
can create a ``hosts`` file entry on your computer and point it directly to one

routes.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ different applications:
101101
# "blog" is the name defined in another .symfony.cloud.yaml
102102
upstream: "blog:http"
103103
104+
.. _wildcard_routes:
105+
104106
Wildcard Routes
105107
~~~~~~~~~~~~~~~
106108

@@ -110,7 +112,18 @@ as any other routes; routed to an application or redirected to another one.
110112
To create a wildcard route, prefix the route with a star (``*``). For example
111113
``*.example.com`` matches any HTTP requests to ``www.example.com``,
112114
``blog.example.com``, or ``us.example.com`` once the wildcard domain
113-
(``*.example.com``) is added to the project.
115+
(``*.example.com``) is added to the project:
116+
117+
.. code-block:: yaml
118+
119+
"https://{all}/":
120+
type: upstream
121+
upstream: "app:http"
122+
123+
"https://*.{default}/":
124+
type: upstream
125+
upstream: "app:http"
126+
114127
115128
.. caution::
116129

0 commit comments

Comments
 (0)