Add RSS feeds (#179)

This commit is contained in:
video-prize-ranch
2025-02-02 21:40:10 -05:00
parent 65e4a5f08e
commit 6641a2b0f7
11 changed files with 190 additions and 48 deletions

View File

@@ -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
View 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()
}