mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-07-28 21:10:10 +00:00
fix: remove unsupported legacy redirects
This commit is contained in:
@@ -15,10 +15,6 @@
|
||||
# root * /var/www/koalasync/website/www
|
||||
# encode zstd gzip
|
||||
#
|
||||
# # Keep one canonical URL for indexable support pages.
|
||||
# redir /help.html /help 308
|
||||
# redir /site-access-help.html /site-access-help 308
|
||||
#
|
||||
# # Clean URLs support (resolves /join to join.html, etc.)
|
||||
# try_files {path} {path}.html {path}/
|
||||
# file_server
|
||||
@@ -65,10 +61,6 @@ sync.koalastuff.net {
|
||||
encode zstd gzip
|
||||
root * /var/www/koalasync/website/www
|
||||
|
||||
# Keep one canonical URL for indexable support pages.
|
||||
redir /help.html /help 308
|
||||
redir /site-access-help.html /site-access-help 308
|
||||
|
||||
# Clean URLs: Resolves paths without .html in the URL
|
||||
try_files {path} {path}.html {path}/
|
||||
file_server
|
||||
|
||||
@@ -183,11 +183,6 @@ for (const value of requiredSelfHostingValues) {
|
||||
if ((selfHostingExamples.match(/localhost:3000/g) || []).length !== 2 || selfHostingExamples.includes('KoalaSync:3000')) {
|
||||
throw new Error('Both Caddy examples must match the compose loopback port binding');
|
||||
}
|
||||
if ((selfHostingExamples.match(/\/help\.html \/help 308/g) || []).length !== 2
|
||||
|| (selfHostingExamples.match(/\/site-access-help\.html \/site-access-help 308/g) || []).length !== 2) {
|
||||
throw new Error('Both Caddy examples must redirect legacy support-page URLs to their clean canonicals');
|
||||
}
|
||||
|
||||
const landingStylesheet = landingStylesheets[0][0];
|
||||
if (!/href="\{\{ASSET_PATH\}\}landing\.min\.css"/.test(landingStylesheet)) {
|
||||
throw new Error('Landing stylesheet must use the landing.min.css build placeholder');
|
||||
|
||||
@@ -73,8 +73,6 @@ Minimal static-site block:
|
||||
```caddy
|
||||
sync.koalastuff.net {
|
||||
root * /var/www/koalasync/website/www
|
||||
redir /help.html /help 308
|
||||
redir /site-access-help.html /site-access-help 308
|
||||
try_files {path} {path}.html {path}/
|
||||
file_server
|
||||
encode zstd gzip
|
||||
|
||||
@@ -1418,10 +1418,6 @@
|
||||
<span class="t-key">root</span> <span class="t-val">*</span> <span class="t-str">/var/www/koalasync/website/www</span>
|
||||
<span class="t-key">encode</span> <span class="t-val">zstd gzip</span>
|
||||
|
||||
<span class="t-comment"># Redirect legacy support-page URLs to their canonical clean URLs</span>
|
||||
<span class="t-key">redir</span> <span class="t-val">/help.html /help 308</span>
|
||||
<span class="t-key">redir</span> <span class="t-val">/site-access-help.html /site-access-help 308</span>
|
||||
|
||||
<span class="t-comment"># Clean URLs support (no .html required)</span>
|
||||
<span class="t-key">try_files</span> <span class="t-val">{path} {path}.html {path}/</span>
|
||||
<span class="t-key">file_server</span>
|
||||
@@ -1454,10 +1450,6 @@
|
||||
<span class="t-key">encode</span> <span class="t-val">zstd gzip</span>
|
||||
<span class="t-key">root</span> <span class="t-val">*</span> <span class="t-str">/var/www/koalasync/website/www</span>
|
||||
|
||||
<span class="t-comment"># Redirect legacy support-page URLs to their canonical clean URLs</span>
|
||||
<span class="t-key">redir</span> <span class="t-val">/help.html /help 308</span>
|
||||
<span class="t-key">redir</span> <span class="t-val">/site-access-help.html /site-access-help 308</span>
|
||||
|
||||
<span class="t-comment"># Clean URLs: Resolves paths without .html in the URL</span>
|
||||
<span class="t-key">try_files</span> <span class="t-val">{path} {path}.html {path}/</span>
|
||||
<span class="t-key">file_server</span>
|
||||
|
||||
Reference in New Issue
Block a user