Skip to content

Commit

Permalink
feat: allow changing target port
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobischof committed Nov 7, 2024
1 parent 1214ed0 commit b392fea
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pkg/zitadel/zitadel.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package zitadel

import "fmt"
import (
"fmt"
"strconv"
)

// Zitadel provides the ability to interact with your ZITADEL instance.
// This includes authentication, authorization as well as explicit API interaction
Expand Down Expand Up @@ -34,6 +37,13 @@ func WithInsecure(port string) Option {
}
}

// WithPort allows to connect to a ZITADEL instance running on a different port
func WithPort(port uint16) Option {
return func(z *Zitadel) {
z.port = strconv.Itoa(int(port))
}
}

// Origin returns the HTTP Origin (schema://hostname[:port]), e.g.
// https://your-instance.zitadel.cloud
// https://your-domain.com
Expand Down

0 comments on commit b392fea

Please sign in to comment.