Skip to content

Commit

Permalink
Add 10min public cache to HTTP server
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Jun 25, 2018
1 parent c549f74 commit 2e1de9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions interfacer/src/browsh/raw_text_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func (h *slashFix) ServeHTTP(w http.ResponseWriter, r *http.Request) {
func handleHTTPServerRequest(w http.ResponseWriter, r *http.Request) {
var message string
urlForBrowsh, _ := url.PathUnescape(strings.TrimPrefix(r.URL.Path, "/"))
w.Header().Set("Cache-Control", "public, max-age=600")
if strings.TrimSpace(urlForBrowsh) == "" {
if (strings.Contains(r.Host, "text.")) {
message = "Welcome to the Browsh plain text client.\n" +
Expand Down

0 comments on commit 2e1de9d

Please sign in to comment.