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 |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 |Port|int|``5353``|Port on which the DNS server must listen
|Logfile|bool|``true``|Enable or disable file logs. |Logfile|bool|``true``|Enable or disable file logs.
|Logdir|string|``/var/log``|Log file directory.
|Database|Section| |Database|Section|
|Type|string|``"postgresql"``|SQL Database type. ``"postgresql"`` or ``"mysql"`` (anything different than ``"postgresql"`` will rollback to ``"mysql"``) |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 |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 |Username|string|``"sacrebleu"``|SQL Database Username
|Password|string|``"superSecretPassword"``|SQL Database Password (optional) |Password|string|``"superSecretPassword"``|SQL Database Password (optional)
|Port|string|``"5432"``|SQL Database port (``"5432"`` for postgres or ``"3306"`` for MySQL by default) |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 |Redis|Section
|IP|string|``"127.0.0.1"``|Redis Database IP |IP|string|``"127.0.0.1"``|Redis Database IP
|Password|string|``""``|Redis Database Password |Password|string|``""``|Redis Database Password

View file

@ -6,6 +6,7 @@ type App struct {
IP string `ini:"IP"` IP string `ini:"IP"`
Logdir string Logdir string
Logfile bool Logfile bool
AllowedOrigins []string //API conf only
} }
//Database : Struct for SQL Database configuration in the config.ini file //Database : Struct for SQL Database configuration in the config.ini file
@ -29,8 +30,8 @@ type Redis struct {
//DNS : Struct for XFR and NS //DNS : Struct for XFR and NS
type DNS struct { type DNS struct {
XfrIPs []string XfrIPs []string //DNS conf only
Nameservers []string Nameservers []string //API conf only
} }
//Conf : Struct for the whole config.ini file when it will be parsed by go-ini //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"` AppMode string `ini:"app_mode"`
App App
Database Database
Redis Redis //DNS conf only
DNS DNS DNS DNS
} }