Documentation ¶
Index ¶
- func GCPProject() string
- func GetHttpPort() string
- func GetOtap() string
- func InitGCPEnvironment(defaultProj string) (string, bool)
- func InitRestrictiveRobotsTxt(router *mux.Router)
- func RunningInGCP() bool
- func SetCacheHeader(w http.ResponseWriter)
- func SetContentSecurityPolicy(defaultSource string, scriptSource string, imageSource string, ...)
- func SetJSonHeader(w http.ResponseWriter)
- func SetPermissionPolicy(pp string)
- func SetupStaticCache()
- func SetupStaticServer(router *mux.Router, inputDir string, emptyPathFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GCPProject ¶
func GCPProject() string
func GetOtap ¶
func GetOtap() string
Retuns string with current OTAP (dev/prod/staging) as set by the OTAP environment
func InitGCPEnvironment ¶
Get the GCP project, and if we are running in cloud
func SetCacheHeader ¶
func SetCacheHeader(w http.ResponseWriter)
Sets the cache-Control header on the writer with the settings of Cache Expiry
func SetContentSecurityPolicy ¶
func SetContentSecurityPolicy(defaultSource string, scriptSource string, imageSource string, styleSource string)
Sets CSP to 'self', plus the given default, script, image and style sources
func SetPermissionPolicy ¶
func SetPermissionPolicy(pp string)
func SetupStaticCache ¶
func SetupStaticCache()
Setup caching variables based on standard, or a future fixed point in time
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.