package cors
import "github.com/coreos/etcd/pkg/cors"
Package cors handles cross-origin HTTP requests (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 ¶
Set implements the flag.Value interface to allow users to define a list of CORS origins
func (*CORSInfo) String ¶
Source Files ¶
- Version
- v3.3.2+incompatible
- Published
- Mar 8, 2018
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 3 minutes ago –
Tools for package owners.