Skip to content

rabeesh/negroni-nocache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

negroni middleware for nocache

Negroni middleware for no cache http headers

Usage

package main

import (
    "fmt"
    "github.com/codegangsta/negroni"
    "github.com/rabeesh/negroni-nocache"
    "net/http"
)


func main() {
    mux := http.NewServeMux()
    mux.HandleFunc("/", func(rw http.ResponseWriter, req *http.Request) {
        fmt.Fprintf(rw, "Welcome to the home page!")
    })

    n := negroni.New()
    n.Use(nocache.New(true))
    n.Use(negroni.NewStatic(http.Dir("public")))
    n.UseHandler(mux)
    n.Run(":5000")
}

About

No cache negroni middleware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages