Readd Redirector config
This commit is contained in:
parent
7a0248f5aa
commit
5522ec8e99
|
@ -11,6 +11,7 @@ func HandleFrontpage(c *fiber.Ctx) error {
|
|||
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{
|
||||
"proto": c.Protocol(),
|
||||
"domain": c.Hostname(),
|
||||
})
|
||||
}
|
|
@ -3,4 +3,9 @@ code {
|
|||
padding: 2px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
summary {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
<head>
|
||||
<title>rimgo</title>
|
||||
|
||||
|
||||
{{> partials/head }}
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/static/css/frontpage.css" />
|
||||
|
||||
</head>
|
||||
|
@ -14,9 +14,11 @@
|
|||
{{> partials/header }}
|
||||
|
||||
<main>
|
||||
<p>An alternative frontend for Imgur. Based on <a href="https://codeberg.org/3np/rimgu">rimgu</a> and rewritten in Go.</p>
|
||||
<p>An alternative frontend for Imgur. Based on <a href="https://codeberg.org/3np/rimgu">rimgu</a> and rewritten in
|
||||
Go.</p>
|
||||
|
||||
<p>It's read-only and works without JavaScript. Images and albums can be viewed without wasting resources from downloading and running tracking scripts. No sign-up nags.</p>
|
||||
<p>It's read-only and works without JavaScript. Images and albums can be viewed without wasting resources from
|
||||
downloading and running tracking scripts. No sign-up nags.</p>
|
||||
|
||||
<h3>Try it!</h3>
|
||||
|
||||
|
@ -38,8 +40,23 @@
|
|||
</ul>
|
||||
|
||||
<h2>Usage</h2>
|
||||
|
||||
<p>Just replace imgur.com or i.imgur.com with <code>{{domain}}</code>! You can setup automatic redirects using <a href="https://github.com/libredirect/libredirect">LibRedirect</a>.</p>
|
||||
|
||||
<p>Just replace imgur.com or i.imgur.com with <code>{{domain}}</code>! You can setup automatic redirects using <a
|
||||
href="https://github.com/libredirect/libredirect">LibRedirect</a> (recommended) or <a href="https://github.com/einaregilsson/Redirector">Redirector</a>.</p>
|
||||
|
||||
<br>
|
||||
<details>
|
||||
<summary>
|
||||
Redirector configuration
|
||||
</summary>
|
||||
<ul>
|
||||
<li>Description: Imgur -> rimgo</li>
|
||||
<li>Example URL: https://imgur.com/a/H8M4rcp</li>
|
||||
<li>Include pattern: <code>^https?://i?.?imgur.com(/.*)?$</code></li>
|
||||
<li>Redirect to: <code>{{proto}}://{{domain}}$2</code></li>
|
||||
<li>Pattern type: Regular Expression</li>
|
||||
</ul>
|
||||
</details>
|
||||
</main>
|
||||
|
||||
{{> partials/footer }}
|
||||
|
|
Loading…
Reference in New Issue