// isCORSPreflight inspects the request to see if this is a valid CORS preflight request.
// These checks are not exhaustive, because the proxied server should be verifying it as well.
//
// See https://www.html5rocks.com/static/images/cors_server_flowchart.png for more info.
isCORSPreflight inspects the request to see if this is a valid CORS preflight request.
These checks are not exhaustive, because the proxied server should be verifying it as well.


// isCORSPreflight inspects the request to see if this is a valid CORS preflight request . // These checks are not exhaustive because the proxied server should be verifying it as well . // // See https : // www . html5rocks . com / static / images / cors_server_flowchart . png for more info .
func isCORSPreflight(r *http.Request) bool {
	return r.Method == http.MethodOptions &&
		r.Header.Get("Access-Control-Request-Method") != "" &&
		r.Header.Get("Origin") != ""
}
func isCORSPreflight ( r * http . Request ) bool { return r . Method == http . MethodOptions && r . Header . Get ( " " ) != " " && r . Header . Get ( " " ) != " " }
isCORSPreflight inspects the request to see if this is a valid CORS preflight request.
isCORSPreflight inspects the request to see if this is a valid CORS preflight request .