This commit is contained in:
YouROK
2021-05-17 14:55:57 +03:00
parent 29f13fd482
commit e578628886
40 changed files with 1319 additions and 656 deletions

14
server/utils/location.go Normal file
View File

@@ -0,0 +1,14 @@
package utils
import (
"github.com/gin-contrib/location"
"github.com/gin-gonic/gin"
)
func GetScheme(c *gin.Context) string {
url := location.Get(c)
if url == nil {
return "http"
}
return url.Scheme
}