-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,9 @@ | ||
{ | ||
# auto_https off | ||
auto_https off | ||
log { | ||
level ERROR | ||
} | ||
} | ||
:8080 { | ||
# issue Let's Encrypt certificate with DNS challenge on DigitalOcean | ||
# tls { | ||
# dns digitalocean {env.DO_TOKEN} | ||
# } | ||
|
||
# redirect Rogue Scholar legacy URLs | ||
@posts path /posts/* /en/posts/* /de/posts/* /es/posts/* /fr/posts/* /it/posts/* /pt/posts/* /tr/posts/* | ||
redir @posts https://legacy.rogue-scholar.org{uri} | ||
|
||
uri replace /en / | ||
uri replace /de / | ||
uri replace /es / | ||
uri replace /fr / | ||
uri replace /it / | ||
uri replace /pt / | ||
uri replace /tr / | ||
|
||
handle /blogs* { | ||
handle /blogs/* { | ||
uri path_regexp /blogs/([^/]+) /communities/$1/records | ||
} | ||
handle { | ||
uri replace /blogs /communities/search | ||
} | ||
|
||
uri query { | ||
query>q | ||
page>p | ||
-category | ||
-generator | ||
-language | ||
} | ||
|
||
reverse_proxy https://beta.rogue-scholar.org { | ||
header_up Host {upstream_hostport} | ||
transport http { | ||
tls_insecure_skip_verify | ||
} | ||
} | ||
|
||
handle { | ||
handle /posts { | ||
uri replace /posts / | ||
} | ||
handle / { | ||
uri replace / /search | ||
} | ||
uri query { | ||
query>q | ||
tags>f | ||
page>p | ||
-category | ||
-generator | ||
-language | ||
f (\D+) subject:$1 | ||
} | ||
|
||
reverse_proxy https://beta.rogue-scholar.org { | ||
header_up Host {upstream_hostport} | ||
transport http { | ||
tls_insecure_skip_verify | ||
} | ||
} | ||
} | ||
} | ||
redir https://rogue-scholar.org{uri} | ||
} |