tuxis-ie / nsedit

DNS Editor working with PowerDNS's new API
GNU General Public License v2.0
198 stars 55 forks source link

Templates with emtpy records name unusable due to "API Error 422: DNS Name '' is not canonical" #164

Closed NuxRo closed 5 years ago

NuxRo commented 6 years ago

Hi,

The template does not work, Nsedit 1.1, Pdns 4.0.3. In the browser I get "API Error 422: DNS Name '' is not canonical". If instead of name => ';, I put an actual value such as "www.whatever.com." then it works. Any way we can refer to the domain somehow, like @ (BIND style) etc?

I have tried the solution mentioned in https://github.com/tuxis-ie/nsedit/issues/142 by @bajizs and that fixes it. Worth checking out.

The canonical thing is a big PITA btw.

$templates[] = array( 'name' => 'Tuxis', 'owner' => 'public', # Set to 'public' to make it available to all users 'records' => array( array( 'name' => '', 'type' => 'MX', 'content' => '200 mx2.tuxis.nl.') ) );

tuxis-ie commented 5 years ago

The issue is with content, not name, I think. I fixed the example in config.inc.php-dist.