Look for X-Forwarded-Proto when constructing URLs (#105)
This commit is contained in:
parent
fab091d75a
commit
45a128713c
|
@ -197,7 +197,7 @@ func (h *Handler) handleDelete(c *gin.Context) {
|
|||
|
||||
func (h *Handler) getURLOrigin(c *gin.Context) string {
|
||||
protocol := "http"
|
||||
if c.Request.TLS != nil || util.GetConfig().UseSSL {
|
||||
if c.Request.TLS != nil || c.GetHeader("X-Forwarded-Proto") == "https" || util.GetConfig().UseSSL {
|
||||
protocol = "https"
|
||||
}
|
||||
return fmt.Sprintf("%s://%s", protocol, c.Request.Host)
|
||||
|
|
Loading…
Reference in New Issue