change config format to be more flexible
This commit is contained in:
parent
34956ed925
commit
710e6d64b1
3 changed files with 65 additions and 30 deletions
22
sg1.toml
22
sg1.toml
|
|
@ -1,10 +1,18 @@
|
|||
# This is an example Stargate configuration file that defines a couple of routes to match against.
|
||||
# Regex can be disabled by uncommenting the following line:
|
||||
#use_regex = false
|
||||
[[routes]]
|
||||
from = "a"
|
||||
to = "https://cptlobster.dev"
|
||||
|
||||
[[routes]]
|
||||
from = "b"
|
||||
to = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||
|
||||
[[routes]]
|
||||
from = "d"
|
||||
to = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||
|
||||
[routes]
|
||||
# These routes will exactly match the specified strings.
|
||||
"a" = "https://cptlobster.dev"
|
||||
"b" = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||
# This is a simple regex matcher. It will match any string that ends in "ic".
|
||||
".*ic" = "https://en.wikipedia.org/wiki/Special:Random"
|
||||
[[routes]]
|
||||
from = ".*ic"
|
||||
to = "https://en.wikipedia.org/wiki/Special:Random"
|
||||
using = "regex"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue