mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2026-01-28 09:31:13 +00:00
add protocol to cache key (#241)
fixes #240 Reviewed-on: https://codeberg.org/rimgo/rimgo/pulls/241 Reviewed-by: video-prize-ranch <video-prize-ranch@noreply.codeberg.org> Co-authored-by: orangix <uleo8b8g@anonaddy.me> Co-committed-by: orangix <uleo8b8g@anonaddy.me>
This commit is contained in:
committed by
video-prize-ranch
parent
107a45e58b
commit
e8ed026962
@@ -2,7 +2,7 @@ package utils
|
||||
|
||||
import "github.com/gofiber/fiber/v2"
|
||||
|
||||
func GetInstanceUrl(c *fiber.Ctx) string {
|
||||
func GetInstanceProtocol(c *fiber.Ctx) string {
|
||||
proto := "https"
|
||||
if !Config.Secure {
|
||||
proto = "http"
|
||||
@@ -10,5 +10,9 @@ func GetInstanceUrl(c *fiber.Ctx) string {
|
||||
if Config.ProtocolDetection {
|
||||
proto = c.Get("X-Forwarded-Proto", proto)
|
||||
}
|
||||
return proto + "://" + c.Hostname()
|
||||
return proto
|
||||
}
|
||||
|
||||
func GetInstanceUrl(c *fiber.Ctx) string {
|
||||
return GetInstanceProtocol(c) + "://" + c.Hostname()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user