mirror of
https://github.com/davidallendj/configurator.git
synced 2025-12-20 11:37:00 -07:00
config: updated to use only host and not port var
This commit is contained in:
parent
0fc81ac67c
commit
1848819244
2 changed files with 4 additions and 10 deletions
|
|
@ -35,10 +35,7 @@ type Config struct {
|
||||||
func New() Config {
|
func New() Config {
|
||||||
return Config{
|
return Config{
|
||||||
Version: "",
|
Version: "",
|
||||||
SmdClient: client.SmdClient{
|
SmdClient: client.SmdClient{Host: "http://127.0.0.1:27779"},
|
||||||
Host: "http://127.0.0.1",
|
|
||||||
Port: 27779,
|
|
||||||
},
|
|
||||||
Targets: map[string]configurator.Target{
|
Targets: map[string]configurator.Target{
|
||||||
"dnsmasq": configurator.Target{
|
"dnsmasq": configurator.Target{
|
||||||
Plugin: "",
|
Plugin: "",
|
||||||
|
|
@ -59,8 +56,7 @@ func New() Config {
|
||||||
|
|
||||||
PluginDirs: []string{},
|
PluginDirs: []string{},
|
||||||
Server: Server{
|
Server: Server{
|
||||||
Host: "127.0.0.1",
|
Host: "127.0.0.1:3334",
|
||||||
Port: 3334,
|
|
||||||
Jwks: Jwks{
|
Jwks: Jwks{
|
||||||
Uri: "",
|
Uri: "",
|
||||||
Retries: 5,
|
Retries: 5,
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,7 @@ func New(conf *config.Config) *Server {
|
||||||
// return based on config values
|
// return based on config values
|
||||||
return &Server{
|
return &Server{
|
||||||
Config: conf,
|
Config: conf,
|
||||||
Server: &http.Server{
|
Server: &http.Server{Addr: fmt.Sprintf("%s", conf.Server.Host)},
|
||||||
Addr: fmt.Sprintf("%s:%d", conf.Server.Host, conf.Server.Port),
|
|
||||||
},
|
|
||||||
Jwks: Jwks{
|
Jwks: Jwks{
|
||||||
Uri: conf.Server.Jwks.Uri,
|
Uri: conf.Server.Jwks.Uri,
|
||||||
Retries: conf.Server.Jwks.Retries,
|
Retries: conf.Server.Jwks.Retries,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue