🧪 Add SSE test tools

This commit is contained in:
2024-01-26 13:07:42 +08:00
parent 97df54a315
commit 450250c419
11 changed files with 138 additions and 25 deletions

28
config/example.toml Normal file
View File

@@ -0,0 +1,28 @@
id = "example-region"
[[locations]]
id = "example-sse"
host = ["localhost:8000"]
path = ["/sse"]
[[locations.destinations]]
id = "example-sse-destination"
uri = "http://localhost:5000?sse=enable"
[[locations.transformers]]
type = "replacePath"
options = { pattern = "/sse", value = "" }
[[locations]]
id = "example-websocket"
host = ["localhost:8000"]
path = ["/ws"]
[[locations.destinations]]
id = "example-websocket-destination"
uri = "http://localhost:8765"
[[locations]]
id = "example-location"
host = ["localhost:8000"]
path = ["/"]
[[locations.destinations]]
id = "example-destination"
uri = "files://test/data"