Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateContentSecurityPolicy ¶
func GenerateContentSecurityPolicy(fileContents []byte, cspEntries CSPEntries) string
GenerateContentSecurityPolicy for the given html file contents
Types ¶
type CSPEntries ¶
CSPEntries stores various values to be converted into the CSP Header value
func (CSPEntries) String ¶
func (c CSPEntries) String() string
type Handler ¶
type Handler struct { FileSystem http.FileSystem RootHandler http.Handler NotFoundHandler http.Handler // contains filtered or unexported fields }
Handler is the Forge Handler
type SinglePageAppHandler ¶
type SinglePageAppHandler struct { FileSystem http.FileSystem FileName string DisableCSPHeader bool BaseCSPEntries CSPEntries }
SinglePageAppHandler serves a file from the http.FileSystem and adds headers relevant to serving a secure
func (*SinglePageAppHandler) ServeHTTP ¶
func (s *SinglePageAppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP satisfies the http.Handler interface
Click to show internal directories.
Click to hide internal directories.