diff --git a/.env.example b/.env.example index 78cd46c..a0a6eb4 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ ADDRESS=0.0.0.0 PORT=3000 FIBER_PREFORK=false IMGUR_CLIENT_ID=546c25a59c58ad7 -PROTO=https +SECURE=true # Instance privacy # For more information, see https://codeberg.org/librarian/librarian/wiki/Instance-privacy diff --git a/pages/rss.go b/pages/rss.go index c397a48..d84ec1a 100644 --- a/pages/rss.go +++ b/pages/rss.go @@ -23,11 +23,7 @@ func HandleTagRSS(c *fiber.Ctx) error { return c.Status(404).SendString("tag not found") } - proto := "https://" - if !utils.Config.Secure { - proto = "http://" - } - instance := proto + c.Hostname() + instance := utils.GetInstanceUrl(c) feed := &feeds.Feed{ Title: tag.Display + " on Imgur", diff --git a/views/tag.hbs b/views/tag.hbs index beb6ecf..b3ed623 100644 --- a/views/tag.hbs +++ b/views/tag.hbs @@ -5,7 +5,9 @@