shithub: hugo

Download patch

ref: be7ba0e98f5ea5debcd34288224f57c360c63dd0
parent: 266f583a8cf08c8c7788cf3ba7328e19bf406dc3
author: spf13 <[email protected]>
date: Fri Oct 4 12:03:13 EDT 2013

server defaults to localhost unless overridden by command line flags

--- a/commands/server.go
+++ b/commands/server.go
@@ -40,7 +40,8 @@
 func server(cmd *cobra.Command, args []string) {
 	InitializeConfig()
 
-	if Config.BaseUrl == "" {
+	// Unless command line overrides, we use localhost for the server
+	if BaseUrl == "" {
 		Config.BaseUrl = "http://localhost:" + strconv.Itoa(serverPort)
 	}