Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-09-22 18:23:15 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-09-22 18:23:15 +0300
commitdf411ec81a4247027ac89f994eb2430d6519cf28 (patch)
treef9c5f59e4f4b1f0a5a610971019d7089b64f18bf
parent0b34af216154367af7f53ce93d44e6b3d58c3f34 (diff)
commands: Rename noHttpCache to noHTTPCache
-rw-r--r--commands/server.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/server.go b/commands/server.go
index b6983c704..f90501629 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -39,7 +39,7 @@ var (
serverInterface string
serverPort int
serverWatch bool
- noHttpCache bool
+ noHTTPCache bool
)
var serverCmd = &cobra.Command{
@@ -87,7 +87,7 @@ func init() {
serverCmd.Flags().IntVarP(&serverPort, "port", "p", 1313, "port on which the server will listen")
serverCmd.Flags().StringVarP(&serverInterface, "bind", "", "127.0.0.1", "interface to which the server will bind")
serverCmd.Flags().BoolVarP(&serverWatch, "watch", "w", true, "watch filesystem for changes and recreate as needed")
- serverCmd.Flags().BoolVar(&noHttpCache, "noHttpCache", false, "prevent HTTP caching")
+ serverCmd.Flags().BoolVar(&noHTTPCache, "noHTTPCache", false, "prevent HTTP caching")
serverCmd.Flags().BoolVarP(&serverAppend, "appendPort", "", true, "append port to baseURL")
serverCmd.Flags().BoolVar(&disableLiveReload, "disableLiveReload", false, "watch without enabling live browser reload on rebuild")
serverCmd.Flags().BoolVar(&navigateToChanged, "navigateToChanged", false, "navigate to changed content file on live browser reload")
@@ -209,7 +209,7 @@ func (c *commandeer) serve(port int) {
fs := filesOnlyFs{httpFs.Dir(c.PathSpec().AbsPathify(c.Cfg.GetString("publishDir")))}
decorate := func(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- if noHttpCache {
+ if noHTTPCache {
w.Header().Set("Cache-Control", " no-store, no-cache, must-revalidate, max-age=0")
w.Header().Set("Pragma", "no-cache")
}