mirror of
https://github.com/coredns/coredns.git
synced 2025-11-11 22:42:21 -05:00
Issue-6671: Fixed the order of plugins. (#6729)
* Issue-6671: Fixed the order of plugins. Signed-off-by: osho-20 <yashjainiiita@gmail.com> * Issue-6671: corrected test cases. Signed-off-by: osho-20 <yashjainiiita@gmail.com> * Issue-6671: fixed CoreDNSServerPorts Signed-off-by: osho-20 <yashjainiiita@gmail.com> * Issue-6671: removed unnecessary change. Signed-off-by: osho-20 <yashjainiiita@gmail.com> * Issue-6671: added extra check for error. Signed-off-by: osho-20 <yashjainiiita@gmail.com> --------- Signed-off-by: osho-20 <yashjainiiita@gmail.com>
This commit is contained in:
@@ -263,8 +263,11 @@ func (c *Config) Handlers() []plugin.Handler {
|
||||
return nil
|
||||
}
|
||||
hs := make([]plugin.Handler, 0, len(c.registry))
|
||||
for k := range c.registry {
|
||||
hs = append(hs, c.registry[k])
|
||||
for _, k := range Directives {
|
||||
registry := c.Handler(k)
|
||||
if registry != nil {
|
||||
hs = append(hs, registry)
|
||||
}
|
||||
}
|
||||
return hs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user