Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add waiting_room enabled_origin_commands support #2931

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"`
jacobbednarz marked this conversation as resolved.
Show resolved Hide resolved
}

// 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