-rw-r--r-- | ui-shared.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 4818e70..c23bc75 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -40,2 +40,6 @@ char *cgit_hosturl() + host = getenv("HTTP_HOST"); + if (host) { + host = xstrdup(host); + } else { host = getenv("SERVER_NAME"); @@ -48,2 +52,3 @@ char *cgit_hosturl() host = xstrdup(host); + } return host; |