Skip to content

Update hostname_pattern.rst #7714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions routing/hostname_pattern.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ instance, if you want to match both ``m.example.com`` and
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
xsi:schemaLocation="http://symfony.com/schema/routing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use https.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched on the documentation (all of it), the https is never used in XML examples. Is it normal to do it just in this example ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @atailouloute is right. We have literally thousands of these XML URLs and none of them use HTTPS. We recently added HTTPS for every link that points to symfony.com (see #7481) but we left on purpose these links unchanged. The reason is that it could generate lots of conflicts when merging other PRs ... but maybe I'm wrong and changing to HTTPS would create no conflicts. In any case, I think we should decide to do that (or not) in a separate PR. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for doing it a specific PR then, but we really should!

http://symfony.com/schema/routing/routing-1.0.xsd">

<route id="mobile_homepage" path="/" host="m.{domain}">
<default key="_controller">AcmeDemoBundle:Main:mobileHomepage</default>
Expand Down Expand Up @@ -251,7 +252,8 @@ You can also set the host option on imported routes:
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
xsi:schemaLocation="http://symfony.com/schema/routing
http://symfony.com/schema/routing/routing-1.0.xsd">

<import resource="@AcmeHelloBundle/Resources/config/routing.xml" host="hello.example.com" />
</routes>
Expand Down