Skip to content

Commit

Permalink
Merge pull request #428 from openziti/reserved_metadata_fix
Browse files Browse the repository at this point in the history
sdk fixes to re-instate reserved share metadata (#427)
  • Loading branch information
michaelquigley authored Oct 25, 2023
2 parents 7bc923d + 7796421 commit 94d17ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/zrok/reserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func (cmd *reserveCommand) run(_ *cobra.Command, args []string) {
}

req := &sdk.ShareRequest{
Reserved: true,
BackendMode: sdk.BackendMode(cmd.backendMode),
ShareMode: shareMode,
BasicAuth: cmd.basicAuth,
Expand Down
1 change: 1 addition & 0 deletions sdk/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const (
)

type ShareRequest struct {
Reserved bool
BackendMode BackendMode
ShareMode ShareMode
Target string
Expand Down
1 change: 1 addition & 0 deletions sdk/share.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func CreateShare(root env_core.Root, request *ShareRequest) (*Share, error) {
default:
return nil, errors.Errorf("unknown share mode '%v'", request.ShareMode)
}
out.Body.Reserved = request.Reserved

if len(request.BasicAuth) > 0 {
out.Body.AuthScheme = string(Basic)
Expand Down

0 comments on commit 94d17ab

Please sign in to comment.