Documentation ¶
Index ¶
Constants ¶
View Source
const KeyAmpSameOriginHeader string = "AMP-Same-Origin"
View Source
const KeyAmpSourceOrigin string = "__amp_source_origin"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cors ¶
type Cors struct { //seconds to cache the response MaxAgeSeconds int // contains filtered or unexported fields }
func (*Cors) EnableAmpFetch ¶
sets the list of allowed AMP urls
func (*Cors) HandleOptions ¶
func (c *Cors) HandleOptions(w http.ResponseWriter, origin string) bool
returns true if origin has been allowed
func (*Cors) ValidateAMP ¶
func (c *Cors) ValidateAMP(w http.ResponseWriter, source string) error
Click to show internal directories.
Click to hide internal directories.