Documentation ¶
Overview ¶
Package cors handles cross-origin HTTP requests (CORS).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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.
Click to show internal directories.
Click to hide internal directories.