Commit Graph

2 Commits

Author SHA1 Message Date
Edward Loveall 4097aa20df
Fix Redirector config escaped strings
When printing out the configuration JSON, the Redirector extension
expects regex escapes to be escaped, themselves. So `\` becomes `\\`.
However, Crystal treats these as escaped character also, and each `\`
must additionally be escaped, so a single slash becomes `\\\\`
2022-07-19 16:28:23 -04:00
Edward Loveall 449ece843a
Provide a configuration file for the Redirector extension
Instead of providing long detailed instructions for how to configure
the Redirector extension, this provides a single json file that users
can import. I started by making a single file stored in the
`public/assets` directory, but then realized this was a regression since
the instructions were customized to each domain. Instead I can use
Lucky's [data] response to dynamically build the JSON config.

[data]:
https://luckyframework.org/guides/http-and-routing/request-and-response#
handling-responses
2022-07-17 15:00:03 -04:00