type AccessController … // NewAccessController returns a new "AccessController" with default "*" values. func NewAccessController() *AccessController { … } // OriginAllowed determines whether the server will allow a given CORS origin. // If CORS is empty, allow all. func (ac *AccessController) OriginAllowed(origin string) bool { … } // IsHostWhitelisted returns true if the host is whitelisted. // If whitelist is empty, allow all. func (ac *AccessController) IsHostWhitelisted(host string) bool { … }