Use instance domain on frontpage

This commit is contained in:
video-prize-ranch 2022-02-02 10:53:33 -05:00
parent 740f62abd9
commit 220ecd847a
No known key found for this signature in database
GPG Key ID: D8EAA4C5B12A7281
2 changed files with 5 additions and 2 deletions

View File

@ -10,5 +10,8 @@ func FrontpageHandler(c *fiber.Ctx) error {
c.Set("Cache-Control", "public,max-age=31557600") c.Set("Cache-Control", "public,max-age=31557600")
c.Set("Content-Security-Policy", "default-src 'none'; style-src 'self'; img-src 'self'; font-src 'self'; block-all-mixed-content") c.Set("Content-Security-Policy", "default-src 'none'; style-src 'self'; img-src 'self'; font-src 'self'; block-all-mixed-content")
return c.Render("frontpage", fiber.Map{}) return c.Render("frontpage", fiber.Map{
"proto": c.Protocol(),
"domain": c.Hostname(),
})
} }

View File

@ -47,7 +47,7 @@
<li>Description: Imgur -> rimgo</li> <li>Description: Imgur -> rimgo</li>
<li>Example URL: https://imgur.com/a/H8M4rcp</li> <li>Example URL: https://imgur.com/a/H8M4rcp</li>
<li>Include pattern: <code>^https?://(i|).?imgur.com(/.*)?$</code></li> <li>Include pattern: <code>^https?://(i|).?imgur.com(/.*)?$</code></li>
<li>Redirect to: <code>https://[INSTANCE DOMAIN]$2</code></li> <li>Redirect to: <code>https://{{domain}}$2</code></li>
<li>Pattern type: Regular Expression</li> <li>Pattern type: Regular Expression</li>
</ul> </ul>