Skip to content

Instantly share code, notes, and snippets.

@ntakouris
Created August 5, 2017 18:50
Show Gist options
  • Save ntakouris/3c23d298667f5c6f248b194038f3727c to your computer and use it in GitHub Desktop.
Save ntakouris/3c23d298667f5c6f248b194038f3727c to your computer and use it in GitHub Desktop.
Bottom Functions
// Set the Vary: Cookie header to protect clients from caching the response.
 w.Header().Add("Vary", "Cookie")
 
 //and
 // Clear the request context after the handler has completed.
 contextClear(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment