• Miek Gieben's avatar
    middleware/proxy: fix except keyword (#505) · dbe1b251
    Miek Gieben authored
    Fix the except keyword usage - the config would allow it, but it was
    not enforced in the code.
    Turns out that **FROM** was also not enforced, fix both, by (basically)
    copying the code from Caddy.
    
    Update the README and tests.
    
    Locally test as well, shows that this works:
    
    ~~~
    .:1053 {
        proxy miek.nl 8.8.8.8:53 {
            except a.miek.nl
        }
        proxy a.miek.nl 8.8.4.4:53
    
        errors stdout
        log stdout
    }
    ~~~
    
    And gives the desired results, not having a proxy line for `a.miek.nl`
    results in a SERVFAIL (as expected).
    
    Fixes #502
    dbe1b251
lookup.go 2.87 KB