Documentation ¶
Overview ¶
Package cors contains filters to handle CORS related requests defined from http://www.w3.org/TR/cors/
Index ¶
Constants ¶
View Source
const DefaultAllowOrigin = "*"
DefaultAllowOrigin sets Access-Control-Allow-Origin when not configured.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get implements a simple read-only access control policy handling preflight and normal requests with a cache age of 10 minutes for preflight requests. Methods other than HEAD, OPTIONS, GET will return 405.
The origin parameter should be the case-insentive fully qualified origin domain to match or '*' to match any domain.
Types ¶
Click to show internal directories.
Click to hide internal directories.