mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-13 11:23:53 +08:00
16 lines
330 B
Go
16 lines
330 B
Go
package core
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/bluenviron/mediamtx/internal/conf"
|
|
)
|
|
|
|
func httpSetTrustedProxies(router *gin.Engine, trustedProxies conf.IPsOrCIDRs) {
|
|
tmp := make([]string, len(trustedProxies))
|
|
for i, entry := range trustedProxies {
|
|
tmp[i] = entry.String()
|
|
}
|
|
router.SetTrustedProxies(tmp)
|
|
}
|