Пример #1
0
func (d *HttpDirective) Apply(c api.Server, items map[string]interface{}) (bool, error) {
	if err := api.Remarshal(items, d); err != nil {
		log.Error("directive.http.remarshal", "error", err)
		return false, err
	}
	host, cf, kf := d.Http, d.CertFile, d.KeyFile
	if host == "" {
		host = d.Https
	}
	// mb check cert and key files exist and are readable
	c.Endpoint(host, cf, kf, host == d.Https)
	return false, nil
}