need to set cache control
This commit is contained in:
parent
8171d5af89
commit
ad07e38f95
4
bloat.go
4
bloat.go
|
@ -17,10 +17,10 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
|
||||||
"image"
|
"image"
|
||||||
"image/png"
|
"image/png"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ func bloat_showflag(writer http.ResponseWriter, req *http.Request) {
|
||||||
img.Pix[p+3] = 255
|
img.Pix[p+3] = 255
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
writer.Header().Set("Cache-Control", "max-age="+somedays())
|
||||||
png.Encode(writer, img)
|
png.Encode(writer, img)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,4 +79,3 @@ func bloat_renderflags(h *Honk) {
|
||||||
return fmt.Sprintf(`<img class="emu" title="%s" src="%s">`, "flag", src)
|
return fmt.Sprintf(`<img class="emu" title="%s" src="%s">`, "flag", src)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue