mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-18 14:08:51 +00:00
Add RSS feeds (#179)
This commit is contained in:
@@ -9,6 +9,7 @@ type config struct {
|
||||
Port string
|
||||
Addr string
|
||||
ImgurId string
|
||||
Secure bool
|
||||
FiberPrefork bool
|
||||
ImageCache bool
|
||||
CleanupInterval time.Duration
|
||||
@@ -44,10 +45,11 @@ func LoadConfig() {
|
||||
}
|
||||
|
||||
Config = config{
|
||||
Port: port,
|
||||
Addr: addr,
|
||||
ImgurId: imgurId,
|
||||
FiberPrefork: os.Getenv("FIBER_PREFORK") == "true",
|
||||
Port: port,
|
||||
Addr: addr,
|
||||
ImgurId: imgurId,
|
||||
Secure: os.Getenv("SECURE") == "true",
|
||||
FiberPrefork: os.Getenv("FIBER_PREFORK") == "true",
|
||||
Privacy: map[string]interface{}{
|
||||
"set": os.Getenv("PRIVACY_NOT_COLLECTED") != "",
|
||||
"policy": os.Getenv("PRIVACY_POLICY"),
|
||||
|
||||
11
utils/getUrl.go
Normal file
11
utils/getUrl.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package utils
|
||||
|
||||
import "github.com/gofiber/fiber/v2"
|
||||
|
||||
func GetInstanceUrl(c *fiber.Ctx) string {
|
||||
proto := "https://"
|
||||
if !Config.Secure {
|
||||
proto = "http://"
|
||||
}
|
||||
return proto + c.Hostname()
|
||||
}
|
||||
Reference in New Issue
Block a user