Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Routing] Output IDN domains instead of punycode for UrlGeneratorInterface::ABSOLUTE_URL #54825

Copy link
Copy link
Open
@ThomasLandauer

Description

@ThomasLandauer
Issue body actions

Description

I have an IDN domain (e.g. exämple.com) with nginx.

  • When I put the punycode domain in nginx config (server_name xn--...), as recommended at http://nginx.org/en/docs/http/server_names.html#idn then $router->generate(..., ..., UrlGeneratorInterface::ABSOLUTE_URL); outputs the punycode url: ttps://xn--...
  • When I put the IDN in nginx config (server_name exämple.com), then routing isn't working at all and I get the "Welcome to Symfony 7" page.

Internally, the router is using Request::getHost(), which uses PHP's $_SERVER['SERVER_NAME'].

So I'm suggesting to run absolute URL's through idn_to_utf8() by default, or add a flag for that. Nobody who has an IDN domain wants to show the punycode version to the users ;-)

Or am I missing something here?

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.