Documentation ¶
Overview ¶
Package headers provides utilities for setting various headers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoNotCache ¶
func DoNotCache(w http.ResponseWriter)
DoNotCache tells the browser to never cache the page being rendered. Performance will take a hit because the server must serve more requests, but sometimes it is vital that the data on a page stays fresh. Examples include the browser almost always displaying a cached result of the page when a user presses the back button, potentially displaying to the user stale data. Using DoNotCache will force the browser to request the server for a new page everytime, without caching it.
TL;DR use this for data-sensitive pages where data changes all the time and it is not acceptable to show outdated information.
func SecurityHeaders ¶
func SecurityHeaders(w http.ResponseWriter)
SecurityHeaders sets headers related to security to every outgoing response. For more information visit https://securityheaders.com.
Types ¶
This section is empty.