Skip to content

Commit

Permalink
update playground and set Referrer-Policy
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Nov 25, 2019
1 parent ae4ec59 commit 4443dda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/inithttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ func (app *App) initHTTP(ctx context.Context) error {
// add app config to request context
func(next http.Handler) http.Handler { return config.Handler(next, app.ConfigStore) },

func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Referrer-Policy", "same-origin")
next.ServeHTTP(w, req)
})
},

// request cooldown tracking (for graceful shutdown)
func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion graphql2/graphqlapp/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package graphqlapp

import "html/template"

const playVersion = "1.7.11"
const playVersion = "1.7.20"

const playHTML = `
<!DOCTYPE html>
Expand Down

0 comments on commit 4443dda

Please sign in to comment.