Open
Description
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