From: Austin Huang <im@austinhuang.me>
---
I let the redirect to apply to everything (since the FAQ did not specify advanced options), which breaks the images. Adding cdn-images exception would be more fool-proof, imo.
src/pages/faq/index_page.cr | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/faq/index_page.cr b/src/pages/faq/index_page.cr
index 307f794..c1494e1 100644
--- a/src/pages/faq/index_page.cr+++ b/src/pages/faq/index_page.cr
@@ -34,7 +34,7 @@ class Faq::IndexPage < MainLayout
end
li do
strong "Include pattern: "
- code "^https?://(?:.*\\.)*(?<!link\\.)medium\\.com(/.*)?$"+ code "^https?://(?:(?!cdn-images-\d+).*\.)*(?<!link\.)medium\.com(/.*)?$" end
li do
strong "Redirect to: "
--
2.33.0
Thanks Austin!
Thinking ahead a little, I wonder how many more of these domain exceptions there are and if it would make more sense to specify some advanced options instead of lengthening an already complex RegularExpression. You mentioned that this would be more fool-proof so it seems like you might have thought about this already.
Edward
On 1 Jan 2022, at 21:31, austinhuang@disroot.org wrote:
> From: Austin Huang <im@austinhuang.me>>> ---> I let the redirect to apply to everything (since the FAQ did not specify advanced options), which breaks the images. Adding cdn-images exception would be more fool-proof, imo.>> src/pages/faq/index_page.cr | 2 +-> 1 file changed, 1 insertion(+), 1 deletion(-)>> diff --git a/src/pages/faq/index_page.cr b/src/pages/faq/index_page.cr> index 307f794..c1494e1 100644> --- a/src/pages/faq/index_page.cr> +++ b/src/pages/faq/index_page.cr> @@ -34,7 +34,7 @@ class Faq::IndexPage < MainLayout> end> li do> strong "Include pattern: "> - code "^https?://(?:.*\\.)*(?<!link\\.)medium\\.com(/.*)?$"> + code "^https?://(?:(?!cdn-images-\d+).*\.)*(?<!link\.)medium\.com(/.*)?$"> end> li do> strong "Redirect to: "> -- > 2.33.0