mirror of
https://github.com/bluenviron/mediamtx
synced 2025-03-02 10:30:38 +00:00
This commit is contained in:
parent
91ada9bf07
commit
64a715a663
@ -462,7 +462,7 @@ If you want to run the standard (non-Docker) version of the server:
|
|||||||
|
|
||||||
The resulting stream will be available in path `/cam`.
|
The resulting stream will be available in path `/cam`.
|
||||||
|
|
||||||
If you want to run the server inside Docker, you need to use the `latest-rpi` image (that already contains libcamera) and launch the container with some additional flags:
|
If you want to run the server inside Docker, you need to use the `latest-rpi` image (that already contains required libraries) and launch the container with some additional flags:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run --rm -it \
|
docker run --rm -it \
|
||||||
|
@ -91,7 +91,7 @@ func (s *hlsHTTPServer) onRequest(ctx *gin.Context) {
|
|||||||
switch ctx.Request.Method {
|
switch ctx.Request.Method {
|
||||||
case http.MethodOptions:
|
case http.MethodOptions:
|
||||||
ctx.Writer.Header().Set("Access-Control-Allow-Methods", "OPTIONS, GET")
|
ctx.Writer.Header().Set("Access-Control-Allow-Methods", "OPTIONS, GET")
|
||||||
ctx.Writer.Header().Set("Access-Control-Allow-Headers", "Range")
|
ctx.Writer.Header().Set("Access-Control-Allow-Headers", "Authorization, Range")
|
||||||
ctx.Writer.WriteHeader(http.StatusOK)
|
ctx.Writer.WriteHeader(http.StatusOK)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ func (s *webRTCHTTPServer) onRequest(ctx *gin.Context) {
|
|||||||
switch ctx.Request.Method {
|
switch ctx.Request.Method {
|
||||||
case http.MethodOptions:
|
case http.MethodOptions:
|
||||||
ctx.Writer.Header().Set("Access-Control-Allow-Methods", "OPTIONS, GET, POST, PATCH")
|
ctx.Writer.Header().Set("Access-Control-Allow-Methods", "OPTIONS, GET, POST, PATCH")
|
||||||
ctx.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, If-Match")
|
ctx.Writer.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Type, If-Match")
|
||||||
ctx.Writer.WriteHeader(http.StatusOK)
|
ctx.Writer.WriteHeader(http.StatusOK)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ func (s *webRTCHTTPServer) onRequest(ctx *gin.Context) {
|
|||||||
switch ctx.Request.Method {
|
switch ctx.Request.Method {
|
||||||
case http.MethodOptions:
|
case http.MethodOptions:
|
||||||
ctx.Writer.Header().Set("Access-Control-Allow-Methods", "OPTIONS, GET, POST, PATCH")
|
ctx.Writer.Header().Set("Access-Control-Allow-Methods", "OPTIONS, GET, POST, PATCH")
|
||||||
ctx.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, If-Match")
|
ctx.Writer.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Type, If-Match")
|
||||||
ctx.Writer.Header()["Link"] = iceServersToLinkHeader(s.parent.generateICEServers())
|
ctx.Writer.Header()["Link"] = iceServersToLinkHeader(s.parent.generateICEServers())
|
||||||
ctx.Writer.WriteHeader(http.StatusOK)
|
ctx.Writer.WriteHeader(http.StatusOK)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user