getkirby-v2 / toolkit

This is the deprecated toolkit for Kirby v2.
http://getkirby.com
81 stars 50 forks source link

Add support for _ as nginx server name #250

Closed Pascalmh closed 4 years ago

Pascalmh commented 7 years ago

This adds support for this Docker Image: https://hub.docker.com/r/richarvey/nginx-php-fpm/

Pascalmh commented 7 years ago

As we had this error we tried to get around it by setting c::set('url', Url::scheme() . '://' . $_SERVER['HTTP_HOST']); in the config.php - this fixed it almost everywhere except for the Pagination in the Panel which still had the wrong host.

ref https://github.com/getkirby/panel/issues/990

lukasbestle commented 7 years ago

To be honest I'm not sure about this. _ is just an example of a "catch-all" server name according to the nginx docs. We will need a more general solution for this (for example by checking if the host we got from the env is actually a valid hostname, but that might have its own issues). We will take a closer look at this later.