Merge pull request #14 from outout14/axfr-support

CORS
This commit is contained in:
Maël 2021-01-17 18:13:55 -04:00 committed by GitHub
commit 8e5bf6ebdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View file

@ -43,13 +43,14 @@ Variables names are case sensitives.
|IP|string|``":"``|IP address on which the DNS server must listen. Blank to listen on all IPs
|Port|int|``5353``|Port on which the DNS server must listen
|Logfile|bool|``true``|Enable or disable file logs.
|Logdir|string|``/var/log``|Log file directory.
|Database|Section|
|Type|string|``"postgresql"``|SQL Database type. ``"postgresql"`` or ``"mysql"`` (anything different than ``"postgresql"`` will rollback to ``"mysql"``)
|Host|string|``"127.0.0.1"`` ``"/var/run/postgres"``|Can be either an IP or a path to a socket for Postgres
|Username|string|``"sacrebleu"``|SQL Database Username
|Password|string|``"superSecretPassword"``|SQL Database Password (optional)
|Port|string|``"5432"``|SQL Database port (``"5432"`` for postgres or ``"3306"`` for MySQL by default)
|Db|string|``"sacrebleudatabase"``|SQL Database Name
|DB|string|``"sacrebleudatabase"``|SQL Database Name
|Redis|Section
|IP|string|``"127.0.0.1"``|Redis Database IP
|Password|string|``""``|Redis Database Password

View file

@ -2,10 +2,11 @@ package utils
//App : Struct for App (dns server) configuration in the config.ini file
type App struct {
Port int
IP string `ini:"IP"`
Logdir string
Logfile bool
Port int
IP string `ini:"IP"`
Logdir string
Logfile bool
AllowedOrigins []string //API conf only
}
//Database : Struct for SQL Database configuration in the config.ini file
@ -29,8 +30,8 @@ type Redis struct {
//DNS : Struct for XFR and NS
type DNS struct {
XfrIPs []string
Nameservers []string
XfrIPs []string //DNS conf only
Nameservers []string //API conf only
}
//Conf : Struct for the whole config.ini file when it will be parsed by go-ini
@ -38,6 +39,6 @@ type Conf struct {
AppMode string `ini:"app_mode"`
App
Database
Redis
DNS DNS
Redis //DNS conf only
DNS DNS
}