Skip to content

Commit

Permalink
Merge pull request #2931 from broswen/bswenson/waiting-room-origin-co…
Browse files Browse the repository at this point in the history
…mmands

add waiting_room enabled_origin_commands support
  • Loading branch information
jacobbednarz authored Aug 26, 2024
2 parents 257b1ef + 38a8d50 commit f04a1d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/2931.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
waiting_room: add support for `enabled_origin_commands`
```
1 change: 1 addition & 0 deletions waiting_room.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type WaitingRoom struct {
CookieSuffix string `json:"cookie_suffix"`
AdditionalRoutes []*WaitingRoomRoute `json:"additional_routes,omitempty"`
QueueingStatusCode int `json:"queueing_status_code"`
EnabledOriginCommands []string `json:"enabled_origin_commands,omitempty"`
}

// WaitingRoomStatus describes the status of a waiting room.
Expand Down
8 changes: 5 additions & 3 deletions waiting_room_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ var waitingRoomJSON = fmt.Sprintf(`
"default_template_language": "en-US",
"next_event_prequeue_start_time": null,
"next_event_start_time": "%s",
"cookie_suffix": "example_shop",
"additional_routes": [{"host": "shop2.example.com", "path": "/shop/checkout"}],
"queueing_status_code": 200
"cookie_suffix": "example_shop",
"additional_routes": [{"host": "shop2.example.com", "path": "/shop/checkout"}],
"queueing_status_code": 200,
"enabled_origin_commands": ["revoke"]
}
`, waitingRoomID, testTimestampWaitingRoom.Format(time.RFC3339Nano), testTimestampWaitingRoom.Format(time.RFC3339Nano),
testTimestampWaitingRoomEventStart.Format(time.RFC3339Nano))
Expand Down Expand Up @@ -129,6 +130,7 @@ var waitingRoom = WaitingRoom{
CookieSuffix: "example_shop",
AdditionalRoutes: []*WaitingRoomRoute{{Host: "shop2.example.com", Path: "/shop/checkout"}},
QueueingStatusCode: 200,
EnabledOriginCommands: []string{"revoke"},
}

var waitingRoomEvent = WaitingRoomEvent{
Expand Down

0 comments on commit f04a1d0

Please sign in to comment.