mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-19 00:27:11 +02:00
Better HTTPS detection
This commit is contained in:
@ -47,7 +47,7 @@ func gistInit(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
}
|
||||
|
||||
httpProtocol := "http"
|
||||
if ctx.Request().TLS != nil {
|
||||
if ctx.Request().TLS != nil || ctx.Request().Header.Get("X-Forwarded-Proto") == "https" {
|
||||
httpProtocol = "https"
|
||||
}
|
||||
setData(ctx, "httpProtocol", strings.ToUpper(httpProtocol))
|
||||
|
Reference in New Issue
Block a user