package cors
import "github.com/coreos/etcd/pkg/cors"
Index ¶
Types ¶
type CORSHandler ¶
func (*CORSHandler) ServeHTTP ¶
func (h *CORSHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP adds the correct CORS headers based on the origin and returns immediately with a 200 OK if the method is OPTIONS.
type CORSInfo ¶
func (CORSInfo) OriginAllowed ¶
OriginAllowed determines whether the server will allow a given CORS origin.
func (*CORSInfo) Set ¶
CORSInfo implements the flag.Value interface to allow users to define a list of CORS origins
func (*CORSInfo) String ¶
Source Files ¶
- Version
- v2.2.1+incompatible
- Published
- Oct 16, 2015
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 3 minutes ago –
Tools for package owners.