Use instance domain on frontpage
This commit is contained in:
parent
740f62abd9
commit
220ecd847a
|
@ -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(),
|
||||||
|
})
|
||||||
}
|
}
|
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue