Skip to content

Commit 090c6c4

Browse files
feat: Update Caddyfile for CORS headers and preflight response; change target host in streamer config
1 parent 6a12427 commit 090c6c4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

infra/terraform/media_relay/templates/Caddyfile.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
${domain_name} {
22
encode gzip
33
4+
header Access-Control-Allow-Origin "*"
5+
header Access-Control-Allow-Methods "GET, POST, OPTIONS, PATCH"
6+
header Access-Control-Allow-Headers "Content-Type, Accept"
7+
8+
@preflight {
9+
method OPTIONS
10+
}
11+
respond @preflight "" 204
12+
413
@hls path /hls*
514
reverse_proxy @hls http://127.0.0.1:8888
615

sbc_streamer/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func loadConfig() streamerConfig {
8484
videoCodec: readEnv("VIDEO_CODEC", "h264_rkmpp"),
8585
videoFormat: readEnv("VIDEO_FORMAT", "nv12"),
8686
streamName: readEnv("STREAM_NAME", "robot"),
87-
targetHost: readEnv("RELAY_HOST", "rtsp.02labs.me:8554"),
87+
targetHost: readEnv("RELAY_HOST", "rtsp.nene.02labs.me:8554"),
8888
publishUser: readEnv("RELAY_PUBLISH_USER", ""),
8989
publishPass: readEnv("RELAY_PUBLISH_PASS", ""),
9090
rtspTransport: readEnv("RTSP_TRANSPORT", "tcp"),

0 commit comments

Comments
 (0)